mirror of https://github.com/stijndcl/didier
43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
|
"""Remove bank levels
|
||
|
|
||
|
Revision ID: ab20a9e527d6
|
||
|
Revises: 09128b6e34dd
|
||
|
Create Date: 2023-09-17 17:13:54.187842
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
from alembic import op
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = "ab20a9e527d6"
|
||
|
down_revision = "09128b6e34dd"
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade() -> None:
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
with op.batch_alter_table("bank", schema=None) as batch_op:
|
||
|
batch_op.drop_column("rob_level")
|
||
|
batch_op.drop_column("interest_level")
|
||
|
batch_op.drop_column("capacity_level")
|
||
|
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade() -> None:
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
with op.batch_alter_table("bank", schema=None) as batch_op:
|
||
|
batch_op.add_column(
|
||
|
sa.Column("capacity_level", sa.INTEGER(), server_default=sa.text("1"), autoincrement=False, nullable=False)
|
||
|
)
|
||
|
batch_op.add_column(
|
||
|
sa.Column("interest_level", sa.INTEGER(), server_default=sa.text("1"), autoincrement=False, nullable=False)
|
||
|
)
|
||
|
batch_op.add_column(
|
||
|
sa.Column("rob_level", sa.INTEGER(), server_default=sa.text("1"), autoincrement=False, nullable=False)
|
||
|
)
|
||
|
|
||
|
# ### end Alembic commands ###
|