-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds a new column in the selfcheck terminals table. * Updates selfcheck CLI. Data Migration Instructions: * run alembic script `b90f8b148948_add_column_to_selfcheck_terminals`. Co-Authored-by: Lauren-D <[email protected]>
- Loading branch information
Showing
4 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
rero_ils/alembic/b90f8b148948_add_column_to_selfcheck_terminals.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# RERO ILS | ||
# Copyright (C) 2022 RERO | ||
# Copyright (C) 2022 UCLouvain | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published by | ||
# the Free Software Foundation, version 3 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
"""Add column to selfcheck_terminals.""" | ||
|
||
from logging import getLogger | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'b90f8b148948' | ||
down_revision = '54134957af7d' | ||
branch_labels = () | ||
depends_on = None | ||
|
||
LOGGER = getLogger('alembic') | ||
|
||
|
||
def upgrade(): | ||
"""Upgrade database.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('selfcheck_terminals', sa.Column('comments', sa.Text(), | ||
nullable=True)) | ||
LOGGER.info(f'column added.') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
"""Downgrade database.""" | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('selfcheck_terminals', 'comments') | ||
LOGGER.info(f'column dropped.') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters