-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase the column width of the subscription role column (#103)
- Loading branch information
Showing
7 changed files
with
62 additions
and
13 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
# Generic single-database configuration. | ||
|
||
## Building migrations: | ||
|
||
Build a fresh database | ||
|
||
`NBEX_DB_URL="sqlite:///test.db" nbexchange` | ||
|
||
Create a migration: | ||
|
||
`NBEX_DB_URL="sqlite:///test.db" python -m nbexchange.dbutil alembic revision --autogenerate -m "Change subscription column width"` | ||
|
||
Apply a migration: | ||
|
||
`NBEX_DB_URL="sqlite:///test.db" python -m nbexchange.dbutil alembic upgrade head` |
23 changes: 23 additions & 0 deletions
23
nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.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,23 @@ | ||
"""Change subscription column width | ||
Revision ID: 2540572282f2 | ||
Revises: bfe19408f64f | ||
Create Date: 2021-08-20 15:24:21.878350 | ||
""" | ||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "2540572282f2" | ||
down_revision = "bfe19408f64f" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.execute("ALTER TABLE subscription ALTER COLUMN role TYPE Text") | ||
|
||
|
||
def downgrade(): | ||
op.execute("ALTER TABLE subscription ALTER COLUMN role TYPE VARCHAR(50)") |
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