33 lines
818 B
Python
33 lines
818 B
Python
"""Add is_admin field
|
|
|
|
Revision ID: f8588cdf998e
|
|
Revises: 3b18d4bfc6ac
|
|
Create Date: 2025-05-13 17:15:53.887878
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'f8588cdf998e'
|
|
down_revision = '3b18d4bfc6ac'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('players', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('is_admin', sa.Boolean(), nullable=False, server_default="0"))
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('players', schema=None) as batch_op:
|
|
batch_op.drop_column('is_admin')
|
|
|
|
# ### end Alembic commands ###
|