From 6e01fe668d05278cd69b24debea33946ed12204e Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 27 Oct 2023 15:34:20 +0200 Subject: [PATCH] Drop bad migration --- ..._add_expires_column_to_permalinks_table.py | 4 +- ...drop_not_null_constrains_on_user_infos_.py | 42 ------------------- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 alembic/versions/d397557cf130_drop_not_null_constrains_on_user_infos_.py diff --git a/alembic/versions/0307976d3d52_add_expires_column_to_permalinks_table.py b/alembic/versions/0307976d3d52_add_expires_column_to_permalinks_table.py index 94eddb7..a6a4515 100644 --- a/alembic/versions/0307976d3d52_add_expires_column_to_permalinks_table.py +++ b/alembic/versions/0307976d3d52_add_expires_column_to_permalinks_table.py @@ -1,7 +1,7 @@ """add expires column to permalinks table Revision ID: 0307976d3d52 -Revises: d397557cf130 +Revises: 85d1c50359ad Create Date: 2023-10-26 19:18:52.896721 """ @@ -11,7 +11,7 @@ # revision identifiers, used by Alembic. revision = '0307976d3d52' -down_revision = 'd397557cf130' +down_revision = '85d1c50359ad' branch_labels = None depends_on = None diff --git a/alembic/versions/d397557cf130_drop_not_null_constrains_on_user_infos_.py b/alembic/versions/d397557cf130_drop_not_null_constrains_on_user_infos_.py deleted file mode 100644 index 97e7715..0000000 --- a/alembic/versions/d397557cf130_drop_not_null_constrains_on_user_infos_.py +++ /dev/null @@ -1,42 +0,0 @@ -"""drop not null constrains on user_infos fields - -Revision ID: d397557cf130 -Revises: 85d1c50359ad -Create Date: 2023-10-25 13:45:55.692935 - -""" -from alembic import op -import sqlalchemy as sa - - -# revision identifiers, used by Alembic. -revision = 'd397557cf130' -down_revision = '85d1c50359ad' -branch_labels = None -depends_on = None - - -def upgrade(): - sql = sa.sql.text(""" - ALTER TABLE qwc_config.user_infos - ALTER COLUMN surname - DROP NOT NULL; - ALTER TABLE qwc_config.user_infos - ALTER COLUMN first_name - DROP NOT NULL; - """) - conn = op.get_bind() - conn.execute(sql) - - -def downgrade(): - sql = sa.sql.text(""" - ALTER TABLE qwc_config.user_infos - ALTER COLUMN surname - NOT NULL; - ALTER TABLE qwc_config.user_infos - ALTER COLUMN first_name - NOT NULL; - """) - conn = op.get_bind() - conn.execute(sql)