"""Add consultancy account to Account Revision ID: 521034349543 Revises: 40d6c8e4be94 Create Date: 2023-10-13 11:07:08.013181 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "521034349543" down_revision = "40d6c8e4be94" branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table("account", schema=None) as batch_op: batch_op.add_column( sa.Column("consultancy_account_id", sa.Integer(), nullable=True) ) batch_op.create_foreign_key( batch_op.f("account_consultancy_account_id_account_fkey"), "account", ["consultancy_account_id"], ["id"], ) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### with op.batch_alter_table("account", schema=None) as batch_op: batch_op.drop_constraint( batch_op.f("account_consultancy_account_id_account_fkey"), type_="foreignkey", ) batch_op.drop_column("consultancy_account_id") # ### end Alembic commands ###