"""tables: qr_token (the QR menu at the table, plan phase 3S, S.7) Revision ID: 0021_table_qr_token Revises: 0020_online_reservations Create Date: 2026-11-16 23:30:00 """ from alembic import op import sqlalchemy as sa revision = '0021_table_qr_token' down_revision = '0020_online_reservations' branch_labels = None depends_on = None def upgrade() -> None: with op.batch_alter_table('tables', schema=None) as batch_op: batch_op.add_column(sa.Column('qr_token', sa.String(), nullable=True)) batch_op.create_unique_constraint('uq_tables_qr_token', ['qr_token']) def downgrade() -> None: with op.batch_alter_table('tables', schema=None) as batch_op: batch_op.drop_constraint('uq_tables_qr_token', type_='unique') batch_op.drop_column('qr_token')