[
  {
    "type": "create_table",
    "description": "Create scheduleShifts table for employee shift definitions",
    "database": "{{store}}",
    "check_query": "SHOW TABLES LIKE 'scheduleShifts'",
    "sql": "CREATE TABLE `scheduleShifts` (\n  `shiftId` int(10) unsigned NOT NULL AUTO_INCREMENT,\n  `employeeId` int(10) unsigned NOT NULL COMMENT 'FK to kiosk_users.users.id (central user ID)',\n  `shiftStart` datetime NOT NULL COMMENT 'Shift start time in UTC',\n  `shiftEnd` datetime NOT NULL COMMENT 'Shift end time in UTC',\n  `positionId` int(10) unsigned DEFAULT NULL COMMENT 'FK to schedulePositions.positionId',\n  `notes` text DEFAULT NULL COMMENT 'Optional shift notes',\n  `createdByUserId` int(10) unsigned NOT NULL COMMENT 'User who created the shift',\n  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),\n  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),\n  `deleted_at` timestamp NULL DEFAULT NULL COMMENT 'Soft delete timestamp',\n  PRIMARY KEY (`shiftId`),\n  KEY `idx_employee_start` (`employeeId`, `shiftStart`),\n  KEY `idx_shiftStart` (`shiftStart`),\n  KEY `idx_deleted` (`deleted_at`),\n  KEY `idx_positionId` (`positionId`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Employee shift definitions for BuyerKiosk native scheduling'"
  }
]
