Skip to content

Commit

Permalink
Format migration code
Browse files Browse the repository at this point in the history
  • Loading branch information
lulunac27a committed Jan 15, 2025
1 parent b0a51cf commit 94e7636
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions migrations/versions/5d319985c5f2_create_user_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,36 @@
Create Date: 2025-01-04 19:10:25.736507
"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '5d319985c5f2'
revision = "5d319985c5f2"
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('username', sa.String(length=80), nullable=False),
sa.Column('xp', sa.Float(), nullable=False),
sa.Column('xp_required', sa.Float(), nullable=False),
sa.Column('total_xp', sa.Float(), nullable=False),
sa.Column('level', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('id'),
sa.UniqueConstraint('username')
op.create_table(
"user",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("username", sa.String(length=80), nullable=False),
sa.Column("xp", sa.Float(), nullable=False),
sa.Column("xp_required", sa.Float(), nullable=False),
sa.Column("total_xp", sa.Float(), nullable=False),
sa.Column("level", sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint("id"),
sa.UniqueConstraint("id"),
sa.UniqueConstraint("username"),
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user')
op.drop_table("user")
# ### end Alembic commands ###

0 comments on commit 94e7636

Please sign in to comment.