mirror of https://github.com/logos-co/open-law.git
fix migrations
This commit is contained in:
parent
dcb74f45ef
commit
f6f7a48f63
|
@ -10,23 +10,30 @@ import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = '776fd9579f1f'
|
revision = "776fd9579f1f"
|
||||||
down_revision = '7c8a5aefe801'
|
down_revision = "96995454b90d"
|
||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table('sections', schema=None) as batch_op:
|
with op.batch_alter_table("sections", schema=None) as batch_op:
|
||||||
batch_op.drop_column('selected_interpretation_id')
|
batch_op.drop_column("selected_interpretation_id")
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table('sections', schema=None) as batch_op:
|
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))
|
batch_op.add_column(
|
||||||
|
sa.Column(
|
||||||
|
"selected_interpretation_id",
|
||||||
|
sa.INTEGER(),
|
||||||
|
autoincrement=False,
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""remove mark fields
|
"""remove mark fields
|
||||||
|
|
||||||
Revision ID: 7c8a5aefe801
|
Revision ID: 7c8a5aefe801
|
||||||
Revises: a41f004cad1a
|
Revises: 776fd9579f1f
|
||||||
Create Date: 2023-05-25 15:44:06.072076
|
Create Date: 2023-05-25 15:44:06.072076
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -11,7 +11,7 @@ import sqlalchemy as sa
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = "7c8a5aefe801"
|
revision = "7c8a5aefe801"
|
||||||
down_revision = "a41f004cad1a"
|
down_revision = "776fd9579f1f"
|
||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""user.is_super_user
|
"""user.is_super_user
|
||||||
|
|
||||||
Revision ID: a41f004cad1a
|
Revision ID: a41f004cad1a
|
||||||
Revises: 7baa732e01c6
|
Revises: 7c8a5aefe801
|
||||||
Create Date: 2023-05-25 14:31:14.046066
|
Create Date: 2023-05-25 14:31:14.046066
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -10,23 +10,23 @@ import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = 'a41f004cad1a'
|
revision = "a41f004cad1a"
|
||||||
down_revision = '7baa732e01c6'
|
down_revision = "7c8a5aefe801"
|
||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table('users', schema=None) as batch_op:
|
with op.batch_alter_table("users", schema=None) as batch_op:
|
||||||
batch_op.add_column(sa.Column('is_super_user', sa.Boolean(), nullable=True))
|
batch_op.add_column(sa.Column("is_super_user", sa.Boolean(), nullable=True))
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table('users', schema=None) as batch_op:
|
with op.batch_alter_table("users", schema=None) as batch_op:
|
||||||
batch_op.drop_column('is_super_user')
|
batch_op.drop_column("is_super_user")
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
Loading…
Reference in New Issue