From f6f7a48f632847079f148cc69a8882bee8d00b3a Mon Sep 17 00:00:00 2001 From: SvyatoslavArtymovych Date: Thu, 8 Jun 2023 11:03:00 +0300 Subject: [PATCH] fix migrations --- ...79f1f_remove_selected_interpretation_id.py | 19 +++++++++++++------ .../7c8a5aefe801_remove_mark_fields.py | 4 ++-- .../a41f004cad1a_user_is_super_user.py | 14 +++++++------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/migrations/versions/776fd9579f1f_remove_selected_interpretation_id.py b/migrations/versions/776fd9579f1f_remove_selected_interpretation_id.py index b1859eb..0e0a7ec 100644 --- a/migrations/versions/776fd9579f1f_remove_selected_interpretation_id.py +++ b/migrations/versions/776fd9579f1f_remove_selected_interpretation_id.py @@ -10,23 +10,30 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision = '776fd9579f1f' -down_revision = '7c8a5aefe801' +revision = "776fd9579f1f" +down_revision = "96995454b90d" branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### - with op.batch_alter_table('sections', schema=None) as batch_op: - batch_op.drop_column('selected_interpretation_id') + with op.batch_alter_table("sections", schema=None) as batch_op: + batch_op.drop_column("selected_interpretation_id") # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - with op.batch_alter_table('sections', schema=None) as batch_op: - batch_op.add_column(sa.Column('selected_interpretation_id', sa.INTEGER(), autoincrement=False, nullable=True)) + with op.batch_alter_table("sections", schema=None) as batch_op: + batch_op.add_column( + sa.Column( + "selected_interpretation_id", + sa.INTEGER(), + autoincrement=False, + nullable=True, + ) + ) # ### end Alembic commands ### diff --git a/migrations/versions/7c8a5aefe801_remove_mark_fields.py b/migrations/versions/7c8a5aefe801_remove_mark_fields.py index e75f3bf..03a4a71 100644 --- a/migrations/versions/7c8a5aefe801_remove_mark_fields.py +++ b/migrations/versions/7c8a5aefe801_remove_mark_fields.py @@ -1,7 +1,7 @@ """remove mark fields Revision ID: 7c8a5aefe801 -Revises: a41f004cad1a +Revises: 776fd9579f1f Create Date: 2023-05-25 15:44:06.072076 """ @@ -11,7 +11,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "7c8a5aefe801" -down_revision = "a41f004cad1a" +down_revision = "776fd9579f1f" branch_labels = None depends_on = None diff --git a/migrations/versions/a41f004cad1a_user_is_super_user.py b/migrations/versions/a41f004cad1a_user_is_super_user.py index 9fd3050..0e55827 100644 --- a/migrations/versions/a41f004cad1a_user_is_super_user.py +++ b/migrations/versions/a41f004cad1a_user_is_super_user.py @@ -1,7 +1,7 @@ """user.is_super_user Revision ID: a41f004cad1a -Revises: 7baa732e01c6 +Revises: 7c8a5aefe801 Create Date: 2023-05-25 14:31:14.046066 """ @@ -10,23 +10,23 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision = 'a41f004cad1a' -down_revision = '7baa732e01c6' +revision = "a41f004cad1a" +down_revision = "7c8a5aefe801" branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### - with op.batch_alter_table('users', schema=None) as batch_op: - batch_op.add_column(sa.Column('is_super_user', sa.Boolean(), nullable=True)) + with op.batch_alter_table("users", schema=None) as batch_op: + batch_op.add_column(sa.Column("is_super_user", sa.Boolean(), nullable=True)) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - with op.batch_alter_table('users', schema=None) as batch_op: - batch_op.drop_column('is_super_user') + with op.batch_alter_table("users", schema=None) as batch_op: + batch_op.drop_column("is_super_user") # ### end Alembic commands ###