mirror of
https://github.com/logos-co/open-law.git
synced 2025-01-28 15:45:20 +00:00
51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
"""copy of fields
|
|
|
|
Revision ID: ef2254f9bc92
|
|
Revises: 03e8384a23e1
|
|
Create Date: 2023-06-13 09:43:26.575245
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "ef2254f9bc92"
|
|
down_revision = "03e8384a23e1"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table("collections", schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column("copy_of", sa.Integer(), nullable=True))
|
|
|
|
with op.batch_alter_table("comments", schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column("copy_of", sa.Integer(), nullable=True))
|
|
|
|
with op.batch_alter_table("interpretations", schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column("copy_of", sa.Integer(), nullable=True))
|
|
|
|
with op.batch_alter_table("sections", schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column("copy_of", sa.Integer(), nullable=True))
|
|
|
|
# ### 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.drop_column("copy_of")
|
|
|
|
with op.batch_alter_table("interpretations", schema=None) as batch_op:
|
|
batch_op.drop_column("copy_of")
|
|
|
|
with op.batch_alter_table("comments", schema=None) as batch_op:
|
|
batch_op.drop_column("copy_of")
|
|
|
|
with op.batch_alter_table("collections", schema=None) as batch_op:
|
|
batch_op.drop_column("copy_of")
|
|
|
|
# ### end Alembic commands ###
|