From 2605408ec74d9f28d2b0fcdbba6a7287ccac9559 Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Mon, 22 Sep 2025 06:27:13 +0200 Subject: [PATCH] Fix jwt-token --- .../20250820000001-create-initial-tables.js | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) 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