added user registration and login
This commit is contained in:
34
migrations/versions/0de18b4ddaa3_initial_migration.py
Normal file
34
migrations/versions/0de18b4ddaa3_initial_migration.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""Initial migration
|
||||
|
||||
Revision ID: 0de18b4ddaa3
|
||||
Revises:
|
||||
Create Date: 2025-01-20 14:50:44.116314
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0de18b4ddaa3'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('player', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('user_id', sa.Integer(), nullable=True))
|
||||
batch_op.create_foreign_key('fk_user_id', 'user', ['user_id'], ['id'])
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('player', schema=None) as batch_op:
|
||||
batch_op.drop_constraint('fk_user_id', type_='foreignkey')
|
||||
batch_op.drop_column('user_id')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Binary file not shown.
Reference in New Issue
Block a user