open-law/migrations/versions/7c8a5aefe801_remove_mark_fields.py

43 lines
1.1 KiB
Python
Raw Normal View History

2023-05-25 15:44:23 +03:00
"""remove mark fields
Revision ID: 7c8a5aefe801
2023-06-08 11:03:00 +03:00
Revises: 776fd9579f1f
2023-05-25 15:44:23 +03:00
Create Date: 2023-05-25 15:44:06.072076
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "7c8a5aefe801"
2023-06-08 11:03:00 +03:00
down_revision = "776fd9579f1f"
2023-05-25 15:44:23 +03:00
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("comments", schema=None) as batch_op:
batch_op.drop_column("marked")
with op.batch_alter_table("interpretations", schema=None) as batch_op:
batch_op.drop_column("marked")
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("interpretations", schema=None) as batch_op:
batch_op.add_column(
sa.Column("marked", sa.BOOLEAN(), autoincrement=False, nullable=True)
)
with op.batch_alter_table("comments", schema=None) as batch_op:
batch_op.add_column(
sa.Column("marked", sa.BOOLEAN(), autoincrement=False, nullable=True)
)
# ### end Alembic commands ###