diff --git a/server/scripts/setup-database.js b/server/scripts/setup-database.js index 9081c7b..4131ffd 100644 --- a/server/scripts/setup-database.js +++ b/server/scripts/setup-database.js @@ -275,17 +275,17 @@ const setupDatabase = async () => { await sequelize.query(` CREATE INDEX IF NOT EXISTS idx_drone_detections_device_timestamp - ON "DroneDetections" (device_id, timestamp); + ON "drone_detections" (device_id, timestamp); `); await sequelize.query(` CREATE INDEX IF NOT EXISTS idx_heartbeats_device_timestamp - ON "Heartbeats" (device_id, timestamp); + ON "heartbeats" (device_id, timestamp); `); await sequelize.query(` CREATE INDEX IF NOT EXISTS idx_alert_logs_user_created - ON "AlertLogs" (user_id, "createdAt"); + ON "alert_logs" (user_id, "created_at"); `); console.log('✅ Database indexes created\n');