Fix jwt-token
This commit is contained in:
@@ -275,17 +275,17 @@ const setupDatabase = async () => {
|
|||||||
|
|
||||||
await sequelize.query(`
|
await sequelize.query(`
|
||||||
CREATE INDEX IF NOT EXISTS idx_drone_detections_device_timestamp
|
CREATE INDEX IF NOT EXISTS idx_drone_detections_device_timestamp
|
||||||
ON "DroneDetections" (device_id, timestamp);
|
ON "drone_detections" (device_id, timestamp);
|
||||||
`);
|
`);
|
||||||
|
|
||||||
await sequelize.query(`
|
await sequelize.query(`
|
||||||
CREATE INDEX IF NOT EXISTS idx_heartbeats_device_timestamp
|
CREATE INDEX IF NOT EXISTS idx_heartbeats_device_timestamp
|
||||||
ON "Heartbeats" (device_id, timestamp);
|
ON "heartbeats" (device_id, timestamp);
|
||||||
`);
|
`);
|
||||||
|
|
||||||
await sequelize.query(`
|
await sequelize.query(`
|
||||||
CREATE INDEX IF NOT EXISTS idx_alert_logs_user_created
|
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');
|
console.log('✅ Database indexes created\n');
|
||||||
|
|||||||
Reference in New Issue
Block a user