[
  {
    "type": "alter_table",
    "description": "Add minRoleId column to scheduleShifts for open shift role requirements - Spec 022",
    "database": "{{store}}",
    "check_query": "SHOW COLUMNS FROM scheduleShifts LIKE 'minRoleId'",
    "sql": "ALTER TABLE `scheduleShifts` ADD COLUMN `minRoleId` tinyint(3) unsigned DEFAULT NULL COMMENT 'Minimum role required to claim this open shift (NULL = any, 1=Owner, 2=Manager, 3=ShiftLead, 4=Buyer, 5=Cashier)' AFTER `positionId`"
  },
  {
    "type": "alter_table",
    "description": "Add index for open shifts with role requirements",
    "database": "{{store}}",
    "check_query": "SHOW INDEX FROM scheduleShifts WHERE Key_name = 'idx_open_shift_role'",
    "sql": "ALTER TABLE `scheduleShifts` ADD INDEX `idx_open_shift_role` (`employeeId`, `minRoleId`)"
  }
]
