availabili.tf/backend-flask/migrations/versions/dcf5ffd0ec73_add_has_confir...

39 lines
1.1 KiB
Python

"""Add has_confirmed column
Revision ID: dcf5ffd0ec73
Revises: 2a33f577d655
Create Date: 2024-11-25 09:17:26.892047
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'dcf5ffd0ec73'
down_revision = '2a33f577d655'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('players_events', schema=None) as batch_op:
batch_op.add_column(sa.Column('has_confirmed', sa.Boolean(), nullable=False))
batch_op.alter_column('player_team_role_id',
existing_type=sa.INTEGER(),
nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('players_events', schema=None) as batch_op:
batch_op.alter_column('player_team_role_id',
existing_type=sa.INTEGER(),
nullable=False)
batch_op.drop_column('has_confirmed')
# ### end Alembic commands ###