open-law/migrations/versions/776fd9579f1f_remove_selected_interpretation_id.py
SvyatoslavArtymovych f6f7a48f63 fix migrations
2023-06-08 11:03:00 +03:00

40 lines
972 B
Python

"""remove selected_interpretation_id
Revision ID: 776fd9579f1f
Revises: 7c8a5aefe801
Create Date: 2023-05-26 14:38:44.858319
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
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")
# ### 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,
)
)
# ### end Alembic commands ###