Skip to content

Commit ee3501c

Browse files
committed
Format new migration code
1 parent 0bd9cf5 commit ee3501c

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

migrations/versions/a5e285045629_create_xp_multipliers.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,38 @@
55
Create Date: 2025-01-14 22:07:08.437280
66
77
"""
8+
89
from alembic import op
910
import sqlalchemy as sa
1011

1112

1213
# revision identifiers, used by Alembic.
13-
revision = 'a5e285045629'
14-
down_revision = '5d319985c5f2'
14+
revision = "a5e285045629"
15+
down_revision = "5d319985c5f2"
1516
branch_labels = None
1617
depends_on = None
1718

1819

1920
def upgrade():
2021
# ### commands auto generated by Alembic - please adjust! ###
21-
with op.batch_alter_table('user', schema=None) as batch_op:
22-
batch_op.add_column(sa.Column('multiplier', sa.Integer(), nullable=False, server_default='1'))
23-
batch_op.add_column(sa.Column('last_item_clicked', sa.Integer(), nullable=False, server_default='0'))
22+
with op.batch_alter_table("user", schema=None) as batch_op:
23+
batch_op.add_column(
24+
sa.Column("multiplier", sa.Integer(),
25+
nullable=False, server_default="1")
26+
)
27+
batch_op.add_column(
28+
sa.Column(
29+
"last_item_clicked", sa.Integer(), nullable=False, server_default="0"
30+
)
31+
)
2432

2533
# ### end Alembic commands ###
2634

2735

2836
def downgrade():
2937
# ### commands auto generated by Alembic - please adjust! ###
30-
with op.batch_alter_table('user', schema=None) as batch_op:
31-
batch_op.drop_column('last_item_clicked')
32-
batch_op.drop_column('multiplier')
38+
with op.batch_alter_table("user", schema=None) as batch_op:
39+
batch_op.drop_column("last_item_clicked")
40+
batch_op.drop_column("multiplier")
3341

3442
# ### end Alembic commands ###

0 commit comments

Comments
 (0)