@tomei/sso 0.64.1 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.commitlintrc.json +22 -22
 - package/.gitlab-ci.yml +16 -16
 - package/.husky/commit-msg +15 -15
 - package/.husky/pre-commit +7 -7
 - package/.prettierrc +4 -4
 - package/Jenkinsfile +57 -57
 - package/README.md +23 -23
 - package/__tests__/unit/components/group/group.spec.ts +79 -79
 - package/__tests__/unit/components/group-object-privilege/group-object-privilege.spec.ts +88 -88
 - package/__tests__/unit/components/group-privilege/group-privilege.spec.ts +68 -68
 - package/__tests__/unit/components/group-reporting-user/group-reporting-user.spec.ts +66 -66
 - package/__tests__/unit/components/group-system-access/group-system-access.spec.ts +83 -83
 - package/__tests__/unit/components/login-user/l.spec.ts +746 -746
 - package/__tests__/unit/components/login-user/login.spec.ts +1164 -1164
 - package/__tests__/unit/components/password-hash/password-hash.service.spec.ts +31 -31
 - package/__tests__/unit/components/system/system.spec.ts +254 -254
 - package/__tests__/unit/components/system-privilege/system-privilege.spec.ts +83 -83
 - package/__tests__/unit/components/user-group/user-group.spec.ts +86 -86
 - package/__tests__/unit/components/user-object-privilege/user-object-privilege.spec.ts +78 -78
 - package/__tests__/unit/components/user-privilege/user-privilege.spec.ts +72 -72
 - package/__tests__/unit/components/user-system-access/user-system-access.spec.ts +89 -89
 - package/__tests__/unit/redis-client/redis.service.spec.ts +23 -23
 - package/__tests__/unit/session/session.service.spec.ts +47 -47
 - package/__tests__/unit/system-privilege/system-privilage.spec.ts +91 -91
 - package/create-sso-user.sql +39 -39
 - package/dist/src/components/login-user/user.js +1 -1
 - package/dist/src/components/login-user/user.js.map +1 -1
 - package/dist/tsconfig.tsbuildinfo +1 -1
 - package/eslint.config.mjs +58 -58
 - package/jest.config.js +14 -14
 - package/migrations/20240314080602-create-user-table.js +124 -124
 - package/migrations/20240314080603-create-user-group-table.js +85 -85
 - package/migrations/20240314080604-create-user-user-group-table.js +55 -55
 - package/migrations/20240314080605-create-login-history-table.js +53 -53
 - package/migrations/20240527064925-create-system-table.js +78 -78
 - package/migrations/20240527064926-create-system-privilege-table.js +71 -71
 - package/migrations/20240527065342-create-group-table.js +93 -93
 - package/migrations/20240527065633-create-group-reporting-user-table.js +76 -76
 - package/migrations/20240528011551-create-group-system-access-table.js +72 -72
 - package/migrations/20240528023018-user-system-access-table.js +75 -75
 - package/migrations/20240528032229-user-privilege-table.js +76 -76
 - package/migrations/20240528063003-create-group-privilege-table.js +76 -76
 - package/migrations/20240528063051-create-group-object-privilege-table.js +84 -84
 - package/migrations/20240528063107-create-user-object-privilege-table.js +84 -84
 - package/migrations/20240528063108-create-api-key-table.js +85 -85
 - package/migrations/20241104104802-create-building-table.js +95 -95
 - package/migrations/20250108091132-add-area-manager-user-id-to-building-table.js +14 -14
 - package/migrations/20250108091133-add-passcode-to-user-table.js +36 -36
 - package/migrations/20250210115636-create-user-reporting-hierarchy.js +76 -76
 - package/migrations/20250326043818-crate-user-password-history.js +42 -42
 - package/migrations/20250610070720-added-MFBypassYN-to-sso-user.js +30 -30
 - package/package.json +87 -87
 - package/sampledotenv +7 -7
 - package/src/components/login-user/user.ts +1 -1
 - package/tsconfig.build.json +5 -5
 - package/tsconfig.json +23 -23
 - package/coverage/clover.xml +0 -1380
 - package/coverage/coverage-final.json +0 -39
 - package/coverage/lcov-report/base.css +0 -224
 - package/coverage/lcov-report/block-navigation.js +0 -87
 - package/coverage/lcov-report/components/group-object-privilege/group-object-privilege.repository.ts.html +0 -160
 - package/coverage/lcov-report/components/group-object-privilege/group-object-privilege.ts.html +0 -919
 - package/coverage/lcov-report/components/group-object-privilege/index.html +0 -131
 - package/coverage/lcov-report/components/group-privilege/group-privilege.repository.ts.html +0 -172
 - package/coverage/lcov-report/components/group-privilege/group-privilege.ts.html +0 -337
 - package/coverage/lcov-report/components/group-privilege/index.html +0 -131
 - package/coverage/lcov-report/components/group-system-access/group-system-access.repository.ts.html +0 -214
 - package/coverage/lcov-report/components/group-system-access/group-system-access.ts.html +0 -355
 - package/coverage/lcov-report/components/group-system-access/index.html +0 -131
 - package/coverage/lcov-report/components/password-hash/index.html +0 -116
 - package/coverage/lcov-report/components/password-hash/password-hash.service.ts.html +0 -127
 - package/coverage/lcov-report/components/system-privilege/index.html +0 -116
 - package/coverage/lcov-report/components/system-privilege/system-privilege.repository.ts.html +0 -139
 - package/coverage/lcov-report/components/user-group/index.html +0 -131
 - package/coverage/lcov-report/components/user-group/user-group.repository.ts.html +0 -142
 - package/coverage/lcov-report/components/user-group/user-group.ts.html +0 -2377
 - package/coverage/lcov-report/components/user-object-privilege/index.html +0 -131
 - package/coverage/lcov-report/components/user-object-privilege/user-object-privilege.repository.ts.html +0 -118
 - package/coverage/lcov-report/components/user-object-privilege/user-object-privilege.ts.html +0 -322
 - package/coverage/lcov-report/components/user-privilege/index.html +0 -131
 - package/coverage/lcov-report/components/user-privilege/user-privilege.repository.ts.html +0 -160
 - package/coverage/lcov-report/components/user-privilege/user-privilege.ts.html +0 -2071
 - package/coverage/lcov-report/components/user-system-access/index.html +0 -131
 - package/coverage/lcov-report/components/user-system-access/user-system-access.repository.ts.html +0 -208
 - package/coverage/lcov-report/components/user-system-access/user-system-access.ts.html +0 -2236
 - package/coverage/lcov-report/enum/api-key.enum.ts.html +0 -100
 - package/coverage/lcov-report/enum/group-type.enum.ts.html +0 -109
 - package/coverage/lcov-report/enum/index.html +0 -206
 - package/coverage/lcov-report/enum/index.ts.html +0 -103
 - package/coverage/lcov-report/enum/login-status.enum.ts.html +0 -97
 - package/coverage/lcov-report/enum/object-status.enum.ts.html +0 -97
 - package/coverage/lcov-report/enum/user-status.enum.ts.html +0 -106
 - package/coverage/lcov-report/enum/yn.enum.ts.html +0 -97
 - package/coverage/lcov-report/favicon.png +0 -0
 - package/coverage/lcov-report/index.html +0 -296
 - package/coverage/lcov-report/models/group-object-privilege.entity.ts.html +0 -358
 - package/coverage/lcov-report/models/group-privilege.entity.ts.html +0 -319
 - package/coverage/lcov-report/models/group-reporting-user.entity.ts.html +0 -370
 - package/coverage/lcov-report/models/group-system-access.entity.ts.html +0 -328
 - package/coverage/lcov-report/models/group.entity.ts.html +0 -466
 - package/coverage/lcov-report/models/index.html +0 -296
 - package/coverage/lcov-report/models/staff.entity.ts.html +0 -358
 - package/coverage/lcov-report/models/system-privilege.entity.ts.html +0 -355
 - package/coverage/lcov-report/models/system.entity.ts.html +0 -424
 - package/coverage/lcov-report/models/user-group.entity.ts.html +0 -358
 - package/coverage/lcov-report/models/user-object-privilege.entity.ts.html +0 -355
 - package/coverage/lcov-report/models/user-privilege.entity.ts.html +0 -319
 - package/coverage/lcov-report/models/user-system-access.entity.ts.html +0 -346
 - package/coverage/lcov-report/models/user.entity.ts.html +0 -685
 - package/coverage/lcov-report/prettify.css +0 -1
 - package/coverage/lcov-report/prettify.js +0 -2
 - package/coverage/lcov-report/redis-client/index.html +0 -116
 - package/coverage/lcov-report/redis-client/redis.service.ts.html +0 -310
 - package/coverage/lcov-report/session/index.html +0 -116
 - package/coverage/lcov-report/session/session.service.ts.html +0 -373
 - package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
 - package/coverage/lcov-report/sorter.js +0 -210
 - package/coverage/lcov.info +0 -2223
 - package/coverage/test-report.xml +0 -71
 - package/dist/__tests__/unit/components/group-privilege/group-privilege.test.d.ts +0 -1
 - package/dist/__tests__/unit/components/group-privilege/group-privilege.test.js +0 -71
 - package/dist/__tests__/unit/components/group-privilege/group-privilege.test.js.map +0 -1
 - package/dist/__tests__/unit/components/login-user/login-user.spec.d.ts +0 -0
 - package/dist/__tests__/unit/components/login-user/login-user.spec.js +0 -6
 - package/dist/__tests__/unit/components/login-user/login-user.spec.js.map +0 -1
 - package/sonar-project.properties +0 -23
 
| 
         @@ -1,95 +1,95 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            'use strict';
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            /** @type {import('sequelize-cli').Migration} */
         
     | 
| 
       4 
     | 
    
         
            -
            module.exports = {
         
     | 
| 
       5 
     | 
    
         
            -
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
       6 
     | 
    
         
            -
                await queryInterface.createTable('sso_Building', {
         
     | 
| 
       7 
     | 
    
         
            -
                  GroupCode: {
         
     | 
| 
       8 
     | 
    
         
            -
                    type: Sequelize.STRING(10),
         
     | 
| 
       9 
     | 
    
         
            -
                    primaryKey: true,
         
     | 
| 
       10 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       11 
     | 
    
         
            -
                    references: {
         
     | 
| 
       12 
     | 
    
         
            -
                      model: 'sso_Group',
         
     | 
| 
       13 
     | 
    
         
            -
                      key: 'GroupCode',
         
     | 
| 
       14 
     | 
    
         
            -
                    },
         
     | 
| 
       15 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       16 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       17 
     | 
    
         
            -
                  },
         
     | 
| 
       18 
     | 
    
         
            -
                  BuildingType: {
         
     | 
| 
       19 
     | 
    
         
            -
                    type: Sequelize.ENUM(
         
     | 
| 
       20 
     | 
    
         
            -
                      'Outlet',
         
     | 
| 
       21 
     | 
    
         
            -
                      'Office',
         
     | 
| 
       22 
     | 
    
         
            -
                      'Fulfillment Center',
         
     | 
| 
       23 
     | 
    
         
            -
                      'Warehouse',
         
     | 
| 
       24 
     | 
    
         
            -
                    ),
         
     | 
| 
       25 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       26 
     | 
    
         
            -
                  },
         
     | 
| 
       27 
     | 
    
         
            -
                  Email: {
         
     | 
| 
       28 
     | 
    
         
            -
                    type: Sequelize.STRING(200),
         
     | 
| 
       29 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       30 
     | 
    
         
            -
                  },
         
     | 
| 
       31 
     | 
    
         
            -
                  Mobile: {
         
     | 
| 
       32 
     | 
    
         
            -
                    type: Sequelize.STRING(20),
         
     | 
| 
       33 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       34 
     | 
    
         
            -
                  },
         
     | 
| 
       35 
     | 
    
         
            -
                  Phone: {
         
     | 
| 
       36 
     | 
    
         
            -
                    type: Sequelize.STRING(20),
         
     | 
| 
       37 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       38 
     | 
    
         
            -
                  },
         
     | 
| 
       39 
     | 
    
         
            -
                  Brand: {
         
     | 
| 
       40 
     | 
    
         
            -
                    type: Sequelize.STRING(10),
         
     | 
| 
       41 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       42 
     | 
    
         
            -
                  },
         
     | 
| 
       43 
     | 
    
         
            -
                  OpeningDate: {
         
     | 
| 
       44 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       45 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       46 
     | 
    
         
            -
                  },
         
     | 
| 
       47 
     | 
    
         
            -
                  CeasedDate: {
         
     | 
| 
       48 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       49 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       50 
     | 
    
         
            -
                  },
         
     | 
| 
       51 
     | 
    
         
            -
                  OpeningHours: {
         
     | 
| 
       52 
     | 
    
         
            -
                    type: Sequelize.STRING(200),
         
     | 
| 
       53 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       54 
     | 
    
         
            -
                  },
         
     | 
| 
       55 
     | 
    
         
            -
                  CreatedById: {
         
     | 
| 
       56 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       57 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       58 
     | 
    
         
            -
                    references: {
         
     | 
| 
       59 
     | 
    
         
            -
                      model: 'sso_User',
         
     | 
| 
       60 
     | 
    
         
            -
                      key: 'UserId',
         
     | 
| 
       61 
     | 
    
         
            -
                    },
         
     | 
| 
       62 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       63 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       64 
     | 
    
         
            -
                  },
         
     | 
| 
       65 
     | 
    
         
            -
                  CreatedAt: {
         
     | 
| 
       66 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       67 
     | 
    
         
            -
                    defaultValue: Sequelize.literal('CURRENT_TIMESTAMP(3)'),
         
     | 
| 
       68 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       69 
     | 
    
         
            -
                  },
         
     | 
| 
       70 
     | 
    
         
            -
                  UpdatedById: {
         
     | 
| 
       71 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       72 
     | 
    
         
            -
                    allowNull: true,
         
     | 
| 
       73 
     | 
    
         
            -
                    references: {
         
     | 
| 
       74 
     | 
    
         
            -
                      model: 'sso_User',
         
     | 
| 
       75 
     | 
    
         
            -
                      key: 'UserId',
         
     | 
| 
       76 
     | 
    
         
            -
                    },
         
     | 
| 
       77 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       78 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       79 
     | 
    
         
            -
                  },
         
     | 
| 
       80 
     | 
    
         
            -
                  UpdatedAt: {
         
     | 
| 
       81 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       82 
     | 
    
         
            -
                    defaultValue: Sequelize.literal('CURRENT_TIMESTAMP(3)'),
         
     | 
| 
       83 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       84 
     | 
    
         
            -
                  },
         
     | 
| 
       85 
     | 
    
         
            -
                });
         
     | 
| 
       86 
     | 
    
         
            -
              },
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
              down: async (queryInterface) => {
         
     | 
| 
       89 
     | 
    
         
            -
                // Drop the trigger before dropping the table
         
     | 
| 
       90 
     | 
    
         
            -
                await queryInterface.sequelize.query(
         
     | 
| 
       91 
     | 
    
         
            -
                  `DROP TRIGGER IF EXISTS update_GroupCode_ObjectId`,
         
     | 
| 
       92 
     | 
    
         
            -
                );
         
     | 
| 
       93 
     | 
    
         
            -
                await queryInterface.dropTable('sso_Building');
         
     | 
| 
       94 
     | 
    
         
            -
              },
         
     | 
| 
       95 
     | 
    
         
            -
            };
         
     | 
| 
      
 1 
     | 
    
         
            +
            'use strict';
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            /** @type {import('sequelize-cli').Migration} */
         
     | 
| 
      
 4 
     | 
    
         
            +
            module.exports = {
         
     | 
| 
      
 5 
     | 
    
         
            +
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
      
 6 
     | 
    
         
            +
                await queryInterface.createTable('sso_Building', {
         
     | 
| 
      
 7 
     | 
    
         
            +
                  GroupCode: {
         
     | 
| 
      
 8 
     | 
    
         
            +
                    type: Sequelize.STRING(10),
         
     | 
| 
      
 9 
     | 
    
         
            +
                    primaryKey: true,
         
     | 
| 
      
 10 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 11 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 12 
     | 
    
         
            +
                      model: 'sso_Group',
         
     | 
| 
      
 13 
     | 
    
         
            +
                      key: 'GroupCode',
         
     | 
| 
      
 14 
     | 
    
         
            +
                    },
         
     | 
| 
      
 15 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 16 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 17 
     | 
    
         
            +
                  },
         
     | 
| 
      
 18 
     | 
    
         
            +
                  BuildingType: {
         
     | 
| 
      
 19 
     | 
    
         
            +
                    type: Sequelize.ENUM(
         
     | 
| 
      
 20 
     | 
    
         
            +
                      'Outlet',
         
     | 
| 
      
 21 
     | 
    
         
            +
                      'Office',
         
     | 
| 
      
 22 
     | 
    
         
            +
                      'Fulfillment Center',
         
     | 
| 
      
 23 
     | 
    
         
            +
                      'Warehouse',
         
     | 
| 
      
 24 
     | 
    
         
            +
                    ),
         
     | 
| 
      
 25 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 26 
     | 
    
         
            +
                  },
         
     | 
| 
      
 27 
     | 
    
         
            +
                  Email: {
         
     | 
| 
      
 28 
     | 
    
         
            +
                    type: Sequelize.STRING(200),
         
     | 
| 
      
 29 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 30 
     | 
    
         
            +
                  },
         
     | 
| 
      
 31 
     | 
    
         
            +
                  Mobile: {
         
     | 
| 
      
 32 
     | 
    
         
            +
                    type: Sequelize.STRING(20),
         
     | 
| 
      
 33 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 34 
     | 
    
         
            +
                  },
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Phone: {
         
     | 
| 
      
 36 
     | 
    
         
            +
                    type: Sequelize.STRING(20),
         
     | 
| 
      
 37 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 38 
     | 
    
         
            +
                  },
         
     | 
| 
      
 39 
     | 
    
         
            +
                  Brand: {
         
     | 
| 
      
 40 
     | 
    
         
            +
                    type: Sequelize.STRING(10),
         
     | 
| 
      
 41 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 42 
     | 
    
         
            +
                  },
         
     | 
| 
      
 43 
     | 
    
         
            +
                  OpeningDate: {
         
     | 
| 
      
 44 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 45 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 46 
     | 
    
         
            +
                  },
         
     | 
| 
      
 47 
     | 
    
         
            +
                  CeasedDate: {
         
     | 
| 
      
 48 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 49 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 50 
     | 
    
         
            +
                  },
         
     | 
| 
      
 51 
     | 
    
         
            +
                  OpeningHours: {
         
     | 
| 
      
 52 
     | 
    
         
            +
                    type: Sequelize.STRING(200),
         
     | 
| 
      
 53 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 54 
     | 
    
         
            +
                  },
         
     | 
| 
      
 55 
     | 
    
         
            +
                  CreatedById: {
         
     | 
| 
      
 56 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 57 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 58 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 59 
     | 
    
         
            +
                      model: 'sso_User',
         
     | 
| 
      
 60 
     | 
    
         
            +
                      key: 'UserId',
         
     | 
| 
      
 61 
     | 
    
         
            +
                    },
         
     | 
| 
      
 62 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 63 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 64 
     | 
    
         
            +
                  },
         
     | 
| 
      
 65 
     | 
    
         
            +
                  CreatedAt: {
         
     | 
| 
      
 66 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 67 
     | 
    
         
            +
                    defaultValue: Sequelize.literal('CURRENT_TIMESTAMP(3)'),
         
     | 
| 
      
 68 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 69 
     | 
    
         
            +
                  },
         
     | 
| 
      
 70 
     | 
    
         
            +
                  UpdatedById: {
         
     | 
| 
      
 71 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 72 
     | 
    
         
            +
                    allowNull: true,
         
     | 
| 
      
 73 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 74 
     | 
    
         
            +
                      model: 'sso_User',
         
     | 
| 
      
 75 
     | 
    
         
            +
                      key: 'UserId',
         
     | 
| 
      
 76 
     | 
    
         
            +
                    },
         
     | 
| 
      
 77 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 78 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 79 
     | 
    
         
            +
                  },
         
     | 
| 
      
 80 
     | 
    
         
            +
                  UpdatedAt: {
         
     | 
| 
      
 81 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 82 
     | 
    
         
            +
                    defaultValue: Sequelize.literal('CURRENT_TIMESTAMP(3)'),
         
     | 
| 
      
 83 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 84 
     | 
    
         
            +
                  },
         
     | 
| 
      
 85 
     | 
    
         
            +
                });
         
     | 
| 
      
 86 
     | 
    
         
            +
              },
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
              down: async (queryInterface) => {
         
     | 
| 
      
 89 
     | 
    
         
            +
                // Drop the trigger before dropping the table
         
     | 
| 
      
 90 
     | 
    
         
            +
                await queryInterface.sequelize.query(
         
     | 
| 
      
 91 
     | 
    
         
            +
                  `DROP TRIGGER IF EXISTS update_GroupCode_ObjectId`,
         
     | 
| 
      
 92 
     | 
    
         
            +
                );
         
     | 
| 
      
 93 
     | 
    
         
            +
                await queryInterface.dropTable('sso_Building');
         
     | 
| 
      
 94 
     | 
    
         
            +
              },
         
     | 
| 
      
 95 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            'use strict';
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module.exports = {
         
     | 
| 
       4 
     | 
    
         
            -
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
       5 
     | 
    
         
            -
                await queryInterface.addColumn('sso_Building', 'AreaManagerUserId', {
         
     | 
| 
       6 
     | 
    
         
            -
                  type: Sequelize.INTEGER(11),
         
     | 
| 
       7 
     | 
    
         
            -
                  allowNull: false,
         
     | 
| 
       8 
     | 
    
         
            -
                });
         
     | 
| 
       9 
     | 
    
         
            -
              },
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
              down: async (queryInterface, Sequelize) => {
         
     | 
| 
       12 
     | 
    
         
            -
                await queryInterface.removeColumn('sso_Building', 'AreaManagerUserId');
         
     | 
| 
       13 
     | 
    
         
            -
              },
         
     | 
| 
       14 
     | 
    
         
            -
            };
         
     | 
| 
      
 1 
     | 
    
         
            +
            'use strict';
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module.exports = {
         
     | 
| 
      
 4 
     | 
    
         
            +
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
      
 5 
     | 
    
         
            +
                await queryInterface.addColumn('sso_Building', 'AreaManagerUserId', {
         
     | 
| 
      
 6 
     | 
    
         
            +
                  type: Sequelize.INTEGER(11),
         
     | 
| 
      
 7 
     | 
    
         
            +
                  allowNull: false,
         
     | 
| 
      
 8 
     | 
    
         
            +
                });
         
     | 
| 
      
 9 
     | 
    
         
            +
              },
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              down: async (queryInterface, Sequelize) => {
         
     | 
| 
      
 12 
     | 
    
         
            +
                await queryInterface.removeColumn('sso_Building', 'AreaManagerUserId');
         
     | 
| 
      
 13 
     | 
    
         
            +
              },
         
     | 
| 
      
 14 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -1,36 +1,36 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            'use strict';
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module.exports = {
         
     | 
| 
       4 
     | 
    
         
            -
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
       5 
     | 
    
         
            -
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
                try {
         
     | 
| 
       8 
     | 
    
         
            -
                  await queryInterface.addColumn('sso_User', 'PasscodeHash', {
         
     | 
| 
       9 
     | 
    
         
            -
                    type: Sequelize.STRING(255),
         
     | 
| 
       10 
     | 
    
         
            -
                  });
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
                  await queryInterface.addColumn('sso_User', 'PasscodeUpdatedAt', {
         
     | 
| 
       13 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       14 
     | 
    
         
            -
                  });
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
                  await transaction.commit();
         
     | 
| 
       17 
     | 
    
         
            -
                } catch (error) {
         
     | 
| 
       18 
     | 
    
         
            -
                  await transaction.rollback();
         
     | 
| 
       19 
     | 
    
         
            -
                  throw error;
         
     | 
| 
       20 
     | 
    
         
            -
                }
         
     | 
| 
       21 
     | 
    
         
            -
              },
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              down: async (queryInterface, Sequelize) => {
         
     | 
| 
       24 
     | 
    
         
            -
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                try {
         
     | 
| 
       27 
     | 
    
         
            -
                  await queryInterface.removeColumn('sso_User', 'PasscodeHash');
         
     | 
| 
       28 
     | 
    
         
            -
                  await queryInterface.removeColumn('sso_User', 'PasscodeUpdatedAt');
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                  await transaction.commit();
         
     | 
| 
       31 
     | 
    
         
            -
                } catch (error) {
         
     | 
| 
       32 
     | 
    
         
            -
                  await transaction.rollback();
         
     | 
| 
       33 
     | 
    
         
            -
                  throw error;
         
     | 
| 
       34 
     | 
    
         
            -
                }
         
     | 
| 
       35 
     | 
    
         
            -
              },
         
     | 
| 
       36 
     | 
    
         
            -
            };
         
     | 
| 
      
 1 
     | 
    
         
            +
            'use strict';
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module.exports = {
         
     | 
| 
      
 4 
     | 
    
         
            +
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
      
 5 
     | 
    
         
            +
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                try {
         
     | 
| 
      
 8 
     | 
    
         
            +
                  await queryInterface.addColumn('sso_User', 'PasscodeHash', {
         
     | 
| 
      
 9 
     | 
    
         
            +
                    type: Sequelize.STRING(255),
         
     | 
| 
      
 10 
     | 
    
         
            +
                  });
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                  await queryInterface.addColumn('sso_User', 'PasscodeUpdatedAt', {
         
     | 
| 
      
 13 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 14 
     | 
    
         
            +
                  });
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                  await transaction.commit();
         
     | 
| 
      
 17 
     | 
    
         
            +
                } catch (error) {
         
     | 
| 
      
 18 
     | 
    
         
            +
                  await transaction.rollback();
         
     | 
| 
      
 19 
     | 
    
         
            +
                  throw error;
         
     | 
| 
      
 20 
     | 
    
         
            +
                }
         
     | 
| 
      
 21 
     | 
    
         
            +
              },
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
              down: async (queryInterface, Sequelize) => {
         
     | 
| 
      
 24 
     | 
    
         
            +
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                try {
         
     | 
| 
      
 27 
     | 
    
         
            +
                  await queryInterface.removeColumn('sso_User', 'PasscodeHash');
         
     | 
| 
      
 28 
     | 
    
         
            +
                  await queryInterface.removeColumn('sso_User', 'PasscodeUpdatedAt');
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                  await transaction.commit();
         
     | 
| 
      
 31 
     | 
    
         
            +
                } catch (error) {
         
     | 
| 
      
 32 
     | 
    
         
            +
                  await transaction.rollback();
         
     | 
| 
      
 33 
     | 
    
         
            +
                  throw error;
         
     | 
| 
      
 34 
     | 
    
         
            +
                }
         
     | 
| 
      
 35 
     | 
    
         
            +
              },
         
     | 
| 
      
 36 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -1,76 +1,76 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            'use strict';
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            /** @type {import('sequelize-cli').Migration} */
         
     | 
| 
       4 
     | 
    
         
            -
            module.exports = {
         
     | 
| 
       5 
     | 
    
         
            -
              async up(queryInterface, Sequelize) {
         
     | 
| 
       6 
     | 
    
         
            -
                await queryInterface.createTable('sso_UserReportingHierarchy', {
         
     | 
| 
       7 
     | 
    
         
            -
                  UserReportingHierarchyId: {
         
     | 
| 
       8 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       9 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       10 
     | 
    
         
            -
                    primaryKey: true,
         
     | 
| 
       11 
     | 
    
         
            -
                    autoIncrement: true,
         
     | 
| 
       12 
     | 
    
         
            -
                  },
         
     | 
| 
       13 
     | 
    
         
            -
                  ReportingUserId: {
         
     | 
| 
       14 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       15 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       16 
     | 
    
         
            -
                    references: {
         
     | 
| 
       17 
     | 
    
         
            -
                      model: 'sso_User',
         
     | 
| 
       18 
     | 
    
         
            -
                      key: 'UserId',
         
     | 
| 
       19 
     | 
    
         
            -
                    },
         
     | 
| 
       20 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       21 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       22 
     | 
    
         
            -
                  },
         
     | 
| 
       23 
     | 
    
         
            -
                  UserId: {
         
     | 
| 
       24 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       25 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       26 
     | 
    
         
            -
                    references: {
         
     | 
| 
       27 
     | 
    
         
            -
                      model: 'sso_User',
         
     | 
| 
       28 
     | 
    
         
            -
                      key: 'UserId',
         
     | 
| 
       29 
     | 
    
         
            -
                    },
         
     | 
| 
       30 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       31 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       32 
     | 
    
         
            -
                  },
         
     | 
| 
       33 
     | 
    
         
            -
                  Rank: {
         
     | 
| 
       34 
     | 
    
         
            -
                    type: Sequelize.TINYINT,
         
     | 
| 
       35 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       36 
     | 
    
         
            -
                  },
         
     | 
| 
       37 
     | 
    
         
            -
                  Status: {
         
     | 
| 
       38 
     | 
    
         
            -
                    type: Sequelize.STRING(10),
         
     | 
| 
       39 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       40 
     | 
    
         
            -
                    defaultValue: 'Active',
         
     | 
| 
       41 
     | 
    
         
            -
                  },
         
     | 
| 
       42 
     | 
    
         
            -
                  CreatedById: {
         
     | 
| 
       43 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       44 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       45 
     | 
    
         
            -
                    references: {
         
     | 
| 
       46 
     | 
    
         
            -
                      model: 'sso_User',
         
     | 
| 
       47 
     | 
    
         
            -
                      key: 'UserId',
         
     | 
| 
       48 
     | 
    
         
            -
                    },
         
     | 
| 
       49 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       50 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       51 
     | 
    
         
            -
                  },
         
     | 
| 
       52 
     | 
    
         
            -
                  CreatedAt: {
         
     | 
| 
       53 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       54 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       55 
     | 
    
         
            -
                  },
         
     | 
| 
       56 
     | 
    
         
            -
                  UpdatedById: {
         
     | 
| 
       57 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       58 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       59 
     | 
    
         
            -
                    references: {
         
     | 
| 
       60 
     | 
    
         
            -
                      model: 'sso_User',
         
     | 
| 
       61 
     | 
    
         
            -
                      key: 'UserId',
         
     | 
| 
       62 
     | 
    
         
            -
                    },
         
     | 
| 
       63 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       64 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       65 
     | 
    
         
            -
                  },
         
     | 
| 
       66 
     | 
    
         
            -
                  UpdatedAt: {
         
     | 
| 
       67 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       68 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       69 
     | 
    
         
            -
                  },
         
     | 
| 
       70 
     | 
    
         
            -
                });
         
     | 
| 
       71 
     | 
    
         
            -
              },
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
              async down(queryInterface) {
         
     | 
| 
       74 
     | 
    
         
            -
                await queryInterface.dropTable('sso_UserReportingHierarchy');
         
     | 
| 
       75 
     | 
    
         
            -
              },
         
     | 
| 
       76 
     | 
    
         
            -
            };
         
     | 
| 
      
 1 
     | 
    
         
            +
            'use strict';
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            /** @type {import('sequelize-cli').Migration} */
         
     | 
| 
      
 4 
     | 
    
         
            +
            module.exports = {
         
     | 
| 
      
 5 
     | 
    
         
            +
              async up(queryInterface, Sequelize) {
         
     | 
| 
      
 6 
     | 
    
         
            +
                await queryInterface.createTable('sso_UserReportingHierarchy', {
         
     | 
| 
      
 7 
     | 
    
         
            +
                  UserReportingHierarchyId: {
         
     | 
| 
      
 8 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 9 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 10 
     | 
    
         
            +
                    primaryKey: true,
         
     | 
| 
      
 11 
     | 
    
         
            +
                    autoIncrement: true,
         
     | 
| 
      
 12 
     | 
    
         
            +
                  },
         
     | 
| 
      
 13 
     | 
    
         
            +
                  ReportingUserId: {
         
     | 
| 
      
 14 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 15 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 16 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 17 
     | 
    
         
            +
                      model: 'sso_User',
         
     | 
| 
      
 18 
     | 
    
         
            +
                      key: 'UserId',
         
     | 
| 
      
 19 
     | 
    
         
            +
                    },
         
     | 
| 
      
 20 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 21 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 22 
     | 
    
         
            +
                  },
         
     | 
| 
      
 23 
     | 
    
         
            +
                  UserId: {
         
     | 
| 
      
 24 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 25 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 26 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 27 
     | 
    
         
            +
                      model: 'sso_User',
         
     | 
| 
      
 28 
     | 
    
         
            +
                      key: 'UserId',
         
     | 
| 
      
 29 
     | 
    
         
            +
                    },
         
     | 
| 
      
 30 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 31 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 32 
     | 
    
         
            +
                  },
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Rank: {
         
     | 
| 
      
 34 
     | 
    
         
            +
                    type: Sequelize.TINYINT,
         
     | 
| 
      
 35 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 36 
     | 
    
         
            +
                  },
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Status: {
         
     | 
| 
      
 38 
     | 
    
         
            +
                    type: Sequelize.STRING(10),
         
     | 
| 
      
 39 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 40 
     | 
    
         
            +
                    defaultValue: 'Active',
         
     | 
| 
      
 41 
     | 
    
         
            +
                  },
         
     | 
| 
      
 42 
     | 
    
         
            +
                  CreatedById: {
         
     | 
| 
      
 43 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 44 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 45 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 46 
     | 
    
         
            +
                      model: 'sso_User',
         
     | 
| 
      
 47 
     | 
    
         
            +
                      key: 'UserId',
         
     | 
| 
      
 48 
     | 
    
         
            +
                    },
         
     | 
| 
      
 49 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 50 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 51 
     | 
    
         
            +
                  },
         
     | 
| 
      
 52 
     | 
    
         
            +
                  CreatedAt: {
         
     | 
| 
      
 53 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 54 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 55 
     | 
    
         
            +
                  },
         
     | 
| 
      
 56 
     | 
    
         
            +
                  UpdatedById: {
         
     | 
| 
      
 57 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 58 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 59 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 60 
     | 
    
         
            +
                      model: 'sso_User',
         
     | 
| 
      
 61 
     | 
    
         
            +
                      key: 'UserId',
         
     | 
| 
      
 62 
     | 
    
         
            +
                    },
         
     | 
| 
      
 63 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 64 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 65 
     | 
    
         
            +
                  },
         
     | 
| 
      
 66 
     | 
    
         
            +
                  UpdatedAt: {
         
     | 
| 
      
 67 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 68 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 69 
     | 
    
         
            +
                  },
         
     | 
| 
      
 70 
     | 
    
         
            +
                });
         
     | 
| 
      
 71 
     | 
    
         
            +
              },
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
              async down(queryInterface) {
         
     | 
| 
      
 74 
     | 
    
         
            +
                await queryInterface.dropTable('sso_UserReportingHierarchy');
         
     | 
| 
      
 75 
     | 
    
         
            +
              },
         
     | 
| 
      
 76 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -1,42 +1,42 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            'use strict';
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            /** @type {import('sequelize-cli').Migration} */
         
     | 
| 
       4 
     | 
    
         
            -
            module.exports = {
         
     | 
| 
       5 
     | 
    
         
            -
              async up(queryInterface, Sequelize) {
         
     | 
| 
       6 
     | 
    
         
            -
                await queryInterface.createTable('sso_UserPasswordHistory', {
         
     | 
| 
       7 
     | 
    
         
            -
                  HistoryId: {
         
     | 
| 
       8 
     | 
    
         
            -
                    type: Sequelize.STRING(30),
         
     | 
| 
       9 
     | 
    
         
            -
                    primaryKey: true,
         
     | 
| 
       10 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       11 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       12 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       13 
     | 
    
         
            -
                  },
         
     | 
| 
       14 
     | 
    
         
            -
                  UserId: {
         
     | 
| 
       15 
     | 
    
         
            -
                    type: Sequelize.INTEGER,
         
     | 
| 
       16 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       17 
     | 
    
         
            -
                    references: {
         
     | 
| 
       18 
     | 
    
         
            -
                      model: 'sso_User',
         
     | 
| 
       19 
     | 
    
         
            -
                      key: 'UserId',
         
     | 
| 
       20 
     | 
    
         
            -
                    },
         
     | 
| 
       21 
     | 
    
         
            -
                    onUpdate: 'CASCADE',
         
     | 
| 
       22 
     | 
    
         
            -
                    onDelete: 'CASCADE',
         
     | 
| 
       23 
     | 
    
         
            -
                  },
         
     | 
| 
       24 
     | 
    
         
            -
                  PasswordHash: {
         
     | 
| 
       25 
     | 
    
         
            -
                    type: Sequelize.STRING(225),
         
     | 
| 
       26 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       27 
     | 
    
         
            -
                  },
         
     | 
| 
       28 
     | 
    
         
            -
                  CreatedAt: {
         
     | 
| 
       29 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       30 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       31 
     | 
    
         
            -
                  },
         
     | 
| 
       32 
     | 
    
         
            -
                  UpdatedAt: {
         
     | 
| 
       33 
     | 
    
         
            -
                    type: Sequelize.DATE,
         
     | 
| 
       34 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       35 
     | 
    
         
            -
                  },
         
     | 
| 
       36 
     | 
    
         
            -
                });
         
     | 
| 
       37 
     | 
    
         
            -
              },
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
              async down(queryInterface, Sequelize) {
         
     | 
| 
       40 
     | 
    
         
            -
                await queryInterface.dropTable('sso_UserPasswordHistory');
         
     | 
| 
       41 
     | 
    
         
            -
              },
         
     | 
| 
       42 
     | 
    
         
            -
            };
         
     | 
| 
      
 1 
     | 
    
         
            +
            'use strict';
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            /** @type {import('sequelize-cli').Migration} */
         
     | 
| 
      
 4 
     | 
    
         
            +
            module.exports = {
         
     | 
| 
      
 5 
     | 
    
         
            +
              async up(queryInterface, Sequelize) {
         
     | 
| 
      
 6 
     | 
    
         
            +
                await queryInterface.createTable('sso_UserPasswordHistory', {
         
     | 
| 
      
 7 
     | 
    
         
            +
                  HistoryId: {
         
     | 
| 
      
 8 
     | 
    
         
            +
                    type: Sequelize.STRING(30),
         
     | 
| 
      
 9 
     | 
    
         
            +
                    primaryKey: true,
         
     | 
| 
      
 10 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 11 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 12 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 13 
     | 
    
         
            +
                  },
         
     | 
| 
      
 14 
     | 
    
         
            +
                  UserId: {
         
     | 
| 
      
 15 
     | 
    
         
            +
                    type: Sequelize.INTEGER,
         
     | 
| 
      
 16 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 17 
     | 
    
         
            +
                    references: {
         
     | 
| 
      
 18 
     | 
    
         
            +
                      model: 'sso_User',
         
     | 
| 
      
 19 
     | 
    
         
            +
                      key: 'UserId',
         
     | 
| 
      
 20 
     | 
    
         
            +
                    },
         
     | 
| 
      
 21 
     | 
    
         
            +
                    onUpdate: 'CASCADE',
         
     | 
| 
      
 22 
     | 
    
         
            +
                    onDelete: 'CASCADE',
         
     | 
| 
      
 23 
     | 
    
         
            +
                  },
         
     | 
| 
      
 24 
     | 
    
         
            +
                  PasswordHash: {
         
     | 
| 
      
 25 
     | 
    
         
            +
                    type: Sequelize.STRING(225),
         
     | 
| 
      
 26 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 27 
     | 
    
         
            +
                  },
         
     | 
| 
      
 28 
     | 
    
         
            +
                  CreatedAt: {
         
     | 
| 
      
 29 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 30 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 31 
     | 
    
         
            +
                  },
         
     | 
| 
      
 32 
     | 
    
         
            +
                  UpdatedAt: {
         
     | 
| 
      
 33 
     | 
    
         
            +
                    type: Sequelize.DATE,
         
     | 
| 
      
 34 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 35 
     | 
    
         
            +
                  },
         
     | 
| 
      
 36 
     | 
    
         
            +
                });
         
     | 
| 
      
 37 
     | 
    
         
            +
              },
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
              async down(queryInterface, Sequelize) {
         
     | 
| 
      
 40 
     | 
    
         
            +
                await queryInterface.dropTable('sso_UserPasswordHistory');
         
     | 
| 
      
 41 
     | 
    
         
            +
              },
         
     | 
| 
      
 42 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -1,30 +1,30 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            'use strict';
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            module.exports = {
         
     | 
| 
       4 
     | 
    
         
            -
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
       5 
     | 
    
         
            -
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
       6 
     | 
    
         
            -
                try {
         
     | 
| 
       7 
     | 
    
         
            -
                  await queryInterface.addColumn('sso_User', 'MFABypassYN', {
         
     | 
| 
       8 
     | 
    
         
            -
                    type: Sequelize.CHAR(1),
         
     | 
| 
       9 
     | 
    
         
            -
                    allowNull: false,
         
     | 
| 
       10 
     | 
    
         
            -
                    defaultValue: 'N',
         
     | 
| 
       11 
     | 
    
         
            -
                  });
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                  await transaction.commit();
         
     | 
| 
       14 
     | 
    
         
            -
                } catch (error) {
         
     | 
| 
       15 
     | 
    
         
            -
                  await transaction.rollback();
         
     | 
| 
       16 
     | 
    
         
            -
                  throw error;
         
     | 
| 
       17 
     | 
    
         
            -
                }
         
     | 
| 
       18 
     | 
    
         
            -
              },
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
              down: async (queryInterface, Sequelize) => {
         
     | 
| 
       21 
     | 
    
         
            -
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
       22 
     | 
    
         
            -
                try {
         
     | 
| 
       23 
     | 
    
         
            -
                  await queryInterface.removeColumn('sso_User', 'MFABypassYN');
         
     | 
| 
       24 
     | 
    
         
            -
                  await transaction.commit();
         
     | 
| 
       25 
     | 
    
         
            -
                } catch (error) {
         
     | 
| 
       26 
     | 
    
         
            -
                  await transaction.rollback();
         
     | 
| 
       27 
     | 
    
         
            -
                  throw error;
         
     | 
| 
       28 
     | 
    
         
            -
                }
         
     | 
| 
       29 
     | 
    
         
            -
              },
         
     | 
| 
       30 
     | 
    
         
            -
            };
         
     | 
| 
      
 1 
     | 
    
         
            +
            'use strict';
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module.exports = {
         
     | 
| 
      
 4 
     | 
    
         
            +
              up: async (queryInterface, Sequelize) => {
         
     | 
| 
      
 5 
     | 
    
         
            +
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
      
 6 
     | 
    
         
            +
                try {
         
     | 
| 
      
 7 
     | 
    
         
            +
                  await queryInterface.addColumn('sso_User', 'MFABypassYN', {
         
     | 
| 
      
 8 
     | 
    
         
            +
                    type: Sequelize.CHAR(1),
         
     | 
| 
      
 9 
     | 
    
         
            +
                    allowNull: false,
         
     | 
| 
      
 10 
     | 
    
         
            +
                    defaultValue: 'N',
         
     | 
| 
      
 11 
     | 
    
         
            +
                  });
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  await transaction.commit();
         
     | 
| 
      
 14 
     | 
    
         
            +
                } catch (error) {
         
     | 
| 
      
 15 
     | 
    
         
            +
                  await transaction.rollback();
         
     | 
| 
      
 16 
     | 
    
         
            +
                  throw error;
         
     | 
| 
      
 17 
     | 
    
         
            +
                }
         
     | 
| 
      
 18 
     | 
    
         
            +
              },
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              down: async (queryInterface, Sequelize) => {
         
     | 
| 
      
 21 
     | 
    
         
            +
                const transaction = await queryInterface.sequelize.transaction();
         
     | 
| 
      
 22 
     | 
    
         
            +
                try {
         
     | 
| 
      
 23 
     | 
    
         
            +
                  await queryInterface.removeColumn('sso_User', 'MFABypassYN');
         
     | 
| 
      
 24 
     | 
    
         
            +
                  await transaction.commit();
         
     | 
| 
      
 25 
     | 
    
         
            +
                } catch (error) {
         
     | 
| 
      
 26 
     | 
    
         
            +
                  await transaction.rollback();
         
     | 
| 
      
 27 
     | 
    
         
            +
                  throw error;
         
     | 
| 
      
 28 
     | 
    
         
            +
                }
         
     | 
| 
      
 29 
     | 
    
         
            +
              },
         
     | 
| 
      
 30 
     | 
    
         
            +
            };
         
     |