Fix jwt-token
This commit is contained in:
@@ -80,7 +80,7 @@ async function startServer() {
|
||||
// Always sync database in containerized environments or development
|
||||
// Check if tables exist before syncing
|
||||
try {
|
||||
await sequelize.sync({ alter: true });
|
||||
await sequelize.sync({ force: false, alter: false });
|
||||
console.log('Database synchronized.');
|
||||
|
||||
// Seed database with initial data
|
||||
@@ -89,7 +89,7 @@ async function startServer() {
|
||||
console.error('Database sync error:', syncError);
|
||||
// If sync fails, try force sync (this will drop and recreate tables)
|
||||
console.log('Attempting force sync...');
|
||||
await sequelize.sync({ force: false, alter: true });
|
||||
await sequelize.sync({ force: true });
|
||||
console.log('Database force synchronized.');
|
||||
|
||||
// Seed database with initial data
|
||||
|
||||
@@ -74,8 +74,11 @@ module.exports = (sequelize) => {
|
||||
comment: 'Whether this detection has been processed for alerts'
|
||||
},
|
||||
threat_level: {
|
||||
type: DataTypes.ENUM('monitoring', 'low', 'medium', 'high', 'critical'),
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
validate: {
|
||||
isIn: [['monitoring', 'low', 'medium', 'high', 'critical']]
|
||||
},
|
||||
comment: 'Assessed threat level based on RSSI and drone type'
|
||||
},
|
||||
estimated_distance: {
|
||||
|
||||
Reference in New Issue
Block a user