mathenoid-backend listening on http://localhost:4000
::1 - - [09/Sep/2026:22:10:37 +0000] "GET /health HTTP/1.1" 200 11 "-" "curl/7.61.1"
::1 - - [09/Sep/2026:22:30:25 +0000] "GET /health HTTP/1.1" 200 11 "-" "curl/7.61.1"
::1 - - [09/Sep/2026:22:30:31 +0000] "GET /health HTTP/1.1" 200 11 "-" "curl/7.61.1"
Expiry sweep failed: Error: Table 'mathenoi_mathenoid.stock_batches' doesn't exist
    at getAll (/home/mathenoi/ict/index.js:466:29)
    at sweepExpiredStock (/home/mathenoi/ict/index.js:4139:32)
    at Timeout._onTimeout (/home/mathenoi/ict/index.js:4284:5)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7) {
  code: 'ER_NO_SUCH_TABLE',
  errno: 1146,
  sqlState: '42S02',
  sqlMessage: "Table 'mathenoi_mathenoid.stock_batches' doesn't exist",
  sql: 'SELECT b.*, i.name AS item_name, s.business_id AS business_id\n' +
    '     FROM stock_batches b\n' +
    '     JOIN stock_items i ON i.id = b.item_id\n' +
    '     JOIN stores s ON s.id = b.store_id\n' +
    "     WHERE b.status = 'active' AND b.expiry_date IS NOT NULL AND b.expiry_date < CURDATE() AND b.quantity > 0"
}
Expiry alert sweep failed: Error: Table 'mathenoi_mathenoid.businesses' doesn't exist
    at getAll (/home/mathenoi/ict/index.js:466:29)
    at sweepExpiryAlerts (/home/mathenoi/ict/index.js:4205:28)
    at Timeout._onTimeout (/home/mathenoi/ict/index.js:4285:5)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7) {
  code: 'ER_NO_SUCH_TABLE',
  errno: 1146,
  sqlState: '42S02',
  sqlMessage: "Table 'mathenoi_mathenoid.businesses' doesn't exist",
  sql: 'SELECT id, expiry_early_alert_enabled, expiry_early_alert_days,\n' +
    '            expiry_final_alert_enabled, expiry_final_alert_days\n' +
    "     FROM businesses WHERE status = 'active'"
}
Expiry sweep failed: Error: Table 'mathenoi_mathenoid.stock_batches' doesn't exist
    at getAll (/home/mathenoi/ict/index.js:466:29)
    at sweepExpiredStock (/home/mathenoi/ict/index.js:4139:32)
    at Timeout._onTimeout (/home/mathenoi/ict/index.js:4284:5)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7) {
  code: 'ER_NO_SUCH_TABLE',
  errno: 1146,
  sqlState: '42S02',
  sqlMessage: "Table 'mathenoi_mathenoid.stock_batches' doesn't exist",
  sql: 'SELECT b.*, i.name AS item_name, s.business_id AS business_id\n' +
    '     FROM stock_batches b\n' +
    '     JOIN stock_items i ON i.id = b.item_id\n' +
    '     JOIN stores s ON s.id = b.store_id\n' +
    "     WHERE b.status = 'active' AND b.expiry_date IS NOT NULL AND b.expiry_date < CURDATE() AND b.quantity > 0"
}
Expiry alert sweep failed: Error: Table 'mathenoi_mathenoid.businesses' doesn't exist
    at getAll (/home/mathenoi/ict/index.js:466:29)
    at sweepExpiryAlerts (/home/mathenoi/ict/index.js:4205:28)
    at Timeout._onTimeout (/home/mathenoi/ict/index.js:4285:5)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7) {
  code: 'ER_NO_SUCH_TABLE',
  errno: 1146,
  sqlState: '42S02',
  sqlMessage: "Table 'mathenoi_mathenoid.businesses' doesn't exist",
  sql: 'SELECT id, expiry_early_alert_enabled, expiry_early_alert_days,\n' +
    '            expiry_final_alert_enabled, expiry_final_alert_days\n' +
    "     FROM businesses WHERE status = 'active'"
}
::1 - - [10/Sep/2026:18:01:29 +0000] "GET /health HTTP/1.1" 200 11 "-" "curl/7.61.1"
