availabili.tf/backend/migrations/versions/4c2197a648ef_add_player_tab...

35 lines
872 B
Python
Raw Normal View History

2024-10-23 16:14:47 -07:00
"""Add player table
Revision ID: 4c2197a648ef
Revises:
Create Date: 2024-10-23 15:20:43.046943
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '4c2197a648ef'
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('player',
sa.Column('steam_id', sa.BigInteger(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('steam_id')
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('player')
# ### end Alembic commands ###