26 lines
1.1 KiB
Python
26 lines
1.1 KiB
Python
"""Add deployment tracking columns to player table."""
|
|
|
|
def upgrade():
|
|
"""Add deployment_status, last_deployment_at, last_deployment_status, last_deployment_message."""
|
|
# This migration adds deployment tracking fields to the player table
|
|
# Execute with: flask db upgrade
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
op.add_column('player', sa.Column('deployment_status', sa.String(50), nullable=True, server_default='pending'))
|
|
op.add_column('player', sa.Column('last_deployment_at', sa.DateTime(), nullable=True))
|
|
op.add_column('player', sa.Column('last_deployment_status', sa.String(50), nullable=True))
|
|
op.add_column('player', sa.Column('last_deployment_message', sa.Text(), nullable=True))
|
|
|
|
|
|
def downgrade():
|
|
"""Remove deployment tracking columns from player table."""
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
op.drop_column('player', 'last_deployment_message')
|
|
op.drop_column('player', 'last_deployment_status')
|
|
op.drop_column('player', 'last_deployment_at')
|
|
op.drop_column('player', 'deployment_status')
|