diff --git a/server/migrations/20250820000001-create-initial-tables.js b/server/migrations/20250820000001-create-initial-tables.js index 769241b..ca09358 100644 --- a/server/migrations/20250820000001-create-initial-tables.js +++ b/server/migrations/20250820000001-create-initial-tables.js @@ -752,6 +752,49 @@ module.exports = { isEmail: true } }, + first_name: { + type: Sequelize.STRING, + allowNull: true + }, + last_name: { + type: Sequelize.STRING, + allowNull: true + }, + login_attempts: { + type: Sequelize.INTEGER, + defaultValue: 0, + comment: 'Failed login attempt counter' + }, + locked_until: { + type: Sequelize.DATE, + allowNull: true, + comment: 'Account lock expiration time' + }, + two_factor_enabled: { + type: Sequelize.BOOLEAN, + defaultValue: false, + comment: 'Whether 2FA is enabled' + }, + two_factor_secret: { + type: Sequelize.STRING, + allowNull: true, + comment: 'TOTP secret for 2FA' + }, + api_access: { + type: Sequelize.BOOLEAN, + defaultValue: true, + comment: 'Whether user can access management API' + }, + created_by: { + type: Sequelize.STRING, + allowNull: true, + comment: 'Username of who created this management user' + }, + notes: { + type: Sequelize.TEXT, + allowNull: true, + comment: 'Admin notes about this user' + }, password_hash: { type: Sequelize.STRING, allowNull: false