63 lines
2.1 KiB
Python
63 lines
2.1 KiB
Python
"""Add position field to Content model
|
|
|
|
Revision ID: c2aad6547472
|
|
Revises: 54d8ece92767
|
|
Create Date: 2025-06-29 15:58:57.678396
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'c2aad6547472'
|
|
down_revision = '54d8ece92767'
|
|
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.alter_column('username',
|
|
existing_type=sa.VARCHAR(length=100),
|
|
type_=sa.String(length=255),
|
|
existing_nullable=False)
|
|
batch_op.alter_column('hostname',
|
|
existing_type=sa.VARCHAR(length=100),
|
|
type_=sa.String(length=255),
|
|
existing_nullable=False)
|
|
batch_op.alter_column('password',
|
|
existing_type=sa.VARCHAR(length=200),
|
|
type_=sa.String(length=255),
|
|
existing_nullable=False)
|
|
batch_op.alter_column('quickconnect_password',
|
|
existing_type=sa.VARCHAR(length=200),
|
|
type_=sa.String(length=255),
|
|
existing_nullable=True)
|
|
|
|
# ### 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.alter_column('quickconnect_password',
|
|
existing_type=sa.String(length=255),
|
|
type_=sa.VARCHAR(length=200),
|
|
existing_nullable=True)
|
|
batch_op.alter_column('password',
|
|
existing_type=sa.String(length=255),
|
|
type_=sa.VARCHAR(length=200),
|
|
existing_nullable=False)
|
|
batch_op.alter_column('hostname',
|
|
existing_type=sa.String(length=255),
|
|
type_=sa.VARCHAR(length=100),
|
|
existing_nullable=False)
|
|
batch_op.alter_column('username',
|
|
existing_type=sa.String(length=255),
|
|
type_=sa.VARCHAR(length=100),
|
|
existing_nullable=False)
|
|
|
|
# ### end Alembic commands ###
|