"""key customer_display.manage for owners and store managers (plan step 3.4) The idle screen is a setting (customer_display.idle) and its images are files, so no table. Revision ID: 0022_customer_display_key Revises: 0021_table_qr_token Create Date: 2026-11-17 10:00:00 """ from alembic import op import sqlalchemy as sa revision = '0022_customer_display_key' down_revision = '0021_table_qr_token' branch_labels = None depends_on = None def upgrade() -> None: op.get_bind().execute(sa.text("insert or ignore into user_permissions (user_id, key) " "select id, 'customer_display.manage' from users where role in ('owner', 'store_manager')")) def downgrade() -> None: op.get_bind().execute(sa.text("delete from user_permissions where key = 'customer_display.manage'"))