From cf2e6016175aeba3fd1d72a25bb2c30011bc738c Mon Sep 17 00:00:00 2001 From: Ian Stuart Date: Fri, 11 Oct 2024 14:59:21 +0100 Subject: [PATCH 1/3] Hide an alembic revision who's down_revision does not exist, and has no revisions using it as a down_revision --- ...-24-21_change_subscription_column_width.py | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py diff --git a/nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py b/nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py deleted file mode 100644 index cb5fe83..0000000 --- a/nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py +++ /dev/null @@ -1,23 +0,0 @@ -"""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)") From 97a3db0d6ec5b99979d27b34e16eadef9fc571a2 Mon Sep 17 00:00:00 2001 From: Ian Stuart Date: Fri, 11 Oct 2024 15:38:22 +0100 Subject: [PATCH 2/3] Sort out revisions again --- ...-24-21_change_subscription_column_width.py | 23 +++++++++++++++++++ .../bfe19408f64f_add_full_name_to_user.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py diff --git a/nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py b/nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py new file mode 100644 index 0000000..cb5fe83 --- /dev/null +++ b/nbexchange/alembic/versions/2021-08-20-15-24-21_change_subscription_column_width.py @@ -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)") diff --git a/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py b/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py index e9d2715..2529068 100644 --- a/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py +++ b/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py @@ -11,7 +11,7 @@ # revision identifiers, used by Alembic. revision = "bfe19408f64f" -down_revision = "f3345539f08d" +down_revision = "2540572282f2" branch_labels = None depends_on = None From 0d510872e821ef503ea6466fca4eaaf29bb54a71 Mon Sep 17 00:00:00 2001 From: Ian Stuart Date: Fri, 11 Oct 2024 15:47:25 +0100 Subject: [PATCH 3/3] un-fsck ian's mis-revision linking --- .../alembic/versions/2024093001_add_emal_and_lms_to_user.py | 2 +- .../alembic/versions/bfe19408f64f_add_full_name_to_user.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nbexchange/alembic/versions/2024093001_add_emal_and_lms_to_user.py b/nbexchange/alembic/versions/2024093001_add_emal_and_lms_to_user.py index 5382b67..6f678b7 100644 --- a/nbexchange/alembic/versions/2024093001_add_emal_and_lms_to_user.py +++ b/nbexchange/alembic/versions/2024093001_add_emal_and_lms_to_user.py @@ -11,7 +11,7 @@ # revision identifiers, used by Alembic. revision = "2024093001" -down_revision = "bfe19408f64f" +down_revision = "2540572282f2" branch_labels = None depends_on = None diff --git a/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py b/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py index 2529068..e9d2715 100644 --- a/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py +++ b/nbexchange/alembic/versions/bfe19408f64f_add_full_name_to_user.py @@ -11,7 +11,7 @@ # revision identifiers, used by Alembic. revision = "bfe19408f64f" -down_revision = "2540572282f2" +down_revision = "f3345539f08d" branch_labels = None depends_on = None