30 lines
668 B
Python
30 lines
668 B
Python
|
|
"""Add explicit lot presence status.
|
||
|
|
|
||
|
|
Revision ID: c8d2e3f4a5b6
|
||
|
|
Revises: b7a1c2d3e4f5
|
||
|
|
Create Date: 2026-08-14
|
||
|
|
"""
|
||
|
|
|
||
|
|
from alembic import op
|
||
|
|
import sqlalchemy as sa
|
||
|
|
|
||
|
|
|
||
|
|
revision = "c8d2e3f4a5b6"
|
||
|
|
down_revision = "b7a1c2d3e4f5"
|
||
|
|
branch_labels = None
|
||
|
|
depends_on = None
|
||
|
|
|
||
|
|
|
||
|
|
def upgrade():
|
||
|
|
op.add_column(
|
||
|
|
"lots",
|
||
|
|
sa.Column("is_present", sa.Boolean(), nullable=False, server_default=sa.true()),
|
||
|
|
)
|
||
|
|
op.add_column("lots", sa.Column("absence_reason", sa.String(length=500), nullable=True))
|
||
|
|
op.alter_column("lots", "is_present", server_default=None)
|
||
|
|
|
||
|
|
|
||
|
|
def downgrade():
|
||
|
|
op.drop_column("lots", "absence_reason")
|
||
|
|
op.drop_column("lots", "is_present")
|