Skip to content

Commit b0a51cf

Browse files
committed
Add new migration
1 parent 3349514 commit b0a51cf

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

migrations/versions/5d319985c5f2_create_user_table.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,34 @@
55
Create Date: 2025-01-04 19:10:25.736507
66
77
"""
8-
98
from alembic import op
109
import sqlalchemy as sa
1110

1211

1312
# revision identifiers, used by Alembic.
14-
revision = "5d319985c5f2"
13+
revision = '5d319985c5f2'
1514
down_revision = None
1615
branch_labels = None
1716
depends_on = None
1817

1918

2019
def upgrade():
2120
# ### commands auto generated by Alembic - please adjust! ###
22-
op.create_table(
23-
"user",
24-
sa.Column("id", sa.Integer(), nullable=False),
25-
sa.Column("username", sa.String(length=80), nullable=False),
26-
sa.Column("xp", sa.Float(), nullable=False),
27-
sa.Column("xp_required", sa.Float(), nullable=False),
28-
sa.Column("total_xp", sa.Float(), nullable=False),
29-
sa.Column("level", sa.Integer(), nullable=False),
30-
sa.PrimaryKeyConstraint("id"),
31-
sa.UniqueConstraint("id"),
32-
sa.UniqueConstraint("username"),
21+
op.create_table('user',
22+
sa.Column('id', sa.Integer(), nullable=False),
23+
sa.Column('username', sa.String(length=80), nullable=False),
24+
sa.Column('xp', sa.Float(), nullable=False),
25+
sa.Column('xp_required', sa.Float(), nullable=False),
26+
sa.Column('total_xp', sa.Float(), nullable=False),
27+
sa.Column('level', sa.Integer(), nullable=False),
28+
sa.PrimaryKeyConstraint('id'),
29+
sa.UniqueConstraint('id'),
30+
sa.UniqueConstraint('username')
3331
)
3432
# ### end Alembic commands ###
3533

3634

3735
def downgrade():
3836
# ### commands auto generated by Alembic - please adjust! ###
39-
op.drop_table("user")
37+
op.drop_table('user')
4038
# ### end Alembic commands ###

0 commit comments

Comments
 (0)