Skip to content

Commit 0bd9cf5

Browse files
committed
Add another migration
1 parent 94e7636 commit 0bd9cf5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""Create XP multipliers
2+
3+
Revision ID: a5e285045629
4+
Revises: 5d319985c5f2
5+
Create Date: 2025-01-14 22:07:08.437280
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
11+
12+
# revision identifiers, used by Alembic.
13+
revision = 'a5e285045629'
14+
down_revision = '5d319985c5f2'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### 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'))
24+
25+
# ### end Alembic commands ###
26+
27+
28+
def downgrade():
29+
# ### 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')
33+
34+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)