mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-10 09:05:48 +02:00
Update db schema
This commit is contained in:
parent
07b356bff2
commit
271cad9565
2 changed files with 42 additions and 9 deletions
42
alembic/versions/ab20a9e527d6_remove_bank_levels.py
Normal file
42
alembic/versions/ab20a9e527d6_remove_bank_levels.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
"""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 ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue