Fix jwt-token

This commit is contained in:
2025-09-17 06:36:19 +02:00
parent c8874a30ed
commit ab368cf64a

View File

@@ -7,6 +7,14 @@
module.exports = { module.exports = {
async up(queryInterface, Sequelize) { async up(queryInterface, Sequelize) {
try {
// Check if devices table exists first
const tables = await queryInterface.showAllTables();
if (!tables.includes('devices')) {
console.log('⚠️ Devices table does not exist yet, skipping device tenant support migration...');
return;
}
// Check if tenant_id column already exists // Check if tenant_id column already exists
const tableDescription = await queryInterface.describeTable('devices'); const tableDescription = await queryInterface.describeTable('devices');