diff --git a/server/migrations/20250820000001-create-initial-tables.js b/server/migrations/20250820000001-create-initial-tables.js index 10c3ce5..ebf7562 100644 --- a/server/migrations/20250820000001-create-initial-tables.js +++ b/server/migrations/20250820000001-create-initial-tables.js @@ -150,6 +150,19 @@ module.exports = { type: Sequelize.STRING, allowNull: false }, + first_name: { + type: DataTypes.STRING, + allowNull: true + }, + last_name: { + type: DataTypes.STRING, + allowNull: true + }, + phone_number: { + type: DataTypes.STRING, + allowNull: true, + comment: 'Phone number for SMS alerts (include country code)' + }, role: { type: Sequelize.ENUM('admin', 'operator', 'viewer'), defaultValue: 'viewer', @@ -165,6 +178,30 @@ module.exports = { allowNull: true, comment: 'User ID from external authentication provider' }, + sms_alerts_enabled: { + type: DataTypes.BOOLEAN, + defaultValue: false, + comment: 'Whether user wants to receive SMS alerts' + }, + is_active: { + type: Sequelize.BOOLEAN, + defaultValue: true, + comment: 'Whether user is active' + }, + email_alerts_enabled: { + type: DataTypes.BOOLEAN, + defaultValue: true, + comment: 'Whether user wants to receive email alerts' + }, + last_login: { + type: DataTypes.DATE, + allowNull: true + }, + timezone: { + type: DataTypes.STRING, + defaultValue: 'UTC', + comment: 'User timezone for alert scheduling' + }, tenant_id: { type: Sequelize.UUID, allowNull: true,