Fix jwt-token
This commit is contained in:
21
server/migrations/20250917-modify-drone-id-to-bigint.js
Normal file
21
server/migrations/20250917-modify-drone-id-to-bigint.js
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
up: async (queryInterface, Sequelize) => {
|
||||||
|
await queryInterface.changeColumn('drone_detections', 'drone_id', {
|
||||||
|
type: Sequelize.BIGINT,
|
||||||
|
allowNull: false,
|
||||||
|
defaultValue: 999999,
|
||||||
|
comment: 'Detected drone identifier (BIGINT for large IDs)'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
down: async (queryInterface, Sequelize) => {
|
||||||
|
await queryInterface.changeColumn('drone_detections', 'drone_id', {
|
||||||
|
type: Sequelize.INTEGER,
|
||||||
|
allowNull: false,
|
||||||
|
defaultValue: 999999,
|
||||||
|
comment: 'Detected drone identifier'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -17,10 +17,10 @@ module.exports = (sequelize) => {
|
|||||||
comment: 'ID of the detecting device'
|
comment: 'ID of the detecting device'
|
||||||
},
|
},
|
||||||
drone_id: {
|
drone_id: {
|
||||||
type: DataTypes.INTEGER,
|
type: DataTypes.BIGINT,
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
defaultValue: 999999,
|
defaultValue: 999999,
|
||||||
comment: 'Detected drone identifier'
|
comment: 'Detected drone identifier (BIGINT for large IDs)'
|
||||||
},
|
},
|
||||||
drone_type: {
|
drone_type: {
|
||||||
type: DataTypes.INTEGER,
|
type: DataTypes.INTEGER,
|
||||||
|
|||||||
Reference in New Issue
Block a user