{
  "errorId": "ERR_1769413778906_irgkwhw1i",
  "timestamp": "2026-01-26T07:49:38.906Z",
  "message": "Table 'finance.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\my_2025_pro\\alkhlodfinance\\backend\\services\\shiftAutoCloseService.js:145:26)\n    at async cron.schedule.scheduled (E:\\my_2025_pro\\alkhlodfinance\\backend\\services\\shiftAutoCloseService.js:231:5)\n    at async Timeout._onTimeout (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\node-cron\\dist\\cjs\\scheduler\\runner.js:70:44)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2026-01-26';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 65429504,
      "heapTotal": 37863424,
      "heapUsed": 31591136,
      "external": 2357593,
      "arrayBuffers": 42614
    },
    "uptime": 78038.8543818
  }
}
----------------------------------------------------------------------------------------------------
{
  "errorId": "ERR_1769413800270_d6dubl7o9",
  "timestamp": "2026-01-26T07:50:00.270Z",
  "message": "Table 'finance.shiftsessions' doesn't exist",
  "stack": "Error\n    at Query.run (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\dialects\\mysql\\query.js:52:25)\n    at E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\sequelize.js:315:28\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MySQLQueryInterface.select (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\dialects\\abstract\\query-interface.js:407:12)\n    at async ShiftSession.findAll (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\sequelize\\lib\\model.js:1140:21)\n    at async autoCloseExpiredSessions (E:\\my_2025_pro\\alkhlodfinance\\backend\\services\\shiftAutoCloseService.js:145:26)\n    at async cron.schedule.scheduled (E:\\my_2025_pro\\alkhlodfinance\\backend\\services\\shiftAutoCloseService.js:231:5)\n    at async Timeout._onTimeout (E:\\my_2025_pro\\alkhlodfinance\\backend\\node_modules\\node-cron\\dist\\cjs\\scheduler\\runner.js:70:44)",
  "name": "SequelizeDatabaseError",
  "sql": "SELECT `ShiftSession`.`id`, `ShiftSession`.`shiftId`, `ShiftSession`.`branchId`, `ShiftSession`.`userId`, `ShiftSession`.`sessionDate`, `ShiftSession`.`startTime`, `ShiftSession`.`endTime`, `ShiftSession`.`expectedStartTime`, `ShiftSession`.`expectedEndTime`, `ShiftSession`.`openingBalance`, `ShiftSession`.`closingBalance`, `ShiftSession`.`expectedClosingBalance`, `ShiftSession`.`cashDifference`, `ShiftSession`.`totalSales`, `ShiftSession`.`totalCash`, `ShiftSession`.`totalCard`, `ShiftSession`.`totalWallet`, `ShiftSession`.`totalTransfer`, `ShiftSession`.`totalDiscount`, `ShiftSession`.`totalTax`, `ShiftSession`.`transactionsCount`, `ShiftSession`.`status`, `ShiftSession`.`closedBy`, `ShiftSession`.`notes`, `ShiftSession`.`closingNotes`, `ShiftSession`.`reportData`, `ShiftSession`.`createdAt`, `ShiftSession`.`updatedAt`, `shift`.`id` AS `shift.id`, `shift`.`shiftName` AS `shift.shiftName`, `shift`.`startTime` AS `shift.startTime`, `shift`.`endTime` AS `shift.endTime` FROM `ShiftSessions` AS `ShiftSession` LEFT OUTER JOIN `Shifts` AS `shift` ON `ShiftSession`.`shiftId` = `shift`.`id` WHERE `ShiftSession`.`status` = 'open' AND `ShiftSession`.`sessionDate` = '2026-01-26';",
  "parameters": {},
  "context": {
    "service": "shiftAutoCloseService"
  },
  "additionalInfo": {},
  "systemInfo": {
    "nodeVersion": "v22.13.1",
    "platform": "win32",
    "arch": "x64",
    "memoryUsage": {
      "rss": 66220032,
      "heapTotal": 37339136,
      "heapUsed": 32243264,
      "external": 2357734,
      "arrayBuffers": 42755
    },
    "uptime": 78060.2187343
  }
}
----------------------------------------------------------------------------------------------------
