dip-dobit-shared-model 1.0.15 → 1.0.16
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.
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
up: async (queryInterface, Sequelize) => {
|
|
5
|
+
const tableDescription = await queryInterface.describeTable("DobitUsers");
|
|
6
|
+
|
|
7
|
+
if (!tableDescription.isPinSet) {
|
|
8
|
+
await queryInterface.addColumn("DobitUsers", "isPinSet", {
|
|
9
|
+
type: Sequelize.BOOLEAN,
|
|
10
|
+
defaultValue: false,
|
|
11
|
+
after: "pin",
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (!tableDescription.isTotpConfigured) {
|
|
16
|
+
await queryInterface.addColumn("DobitUsers", "isTotpConfigured", {
|
|
17
|
+
type: Sequelize.BOOLEAN,
|
|
18
|
+
defaultValue: false,
|
|
19
|
+
after: "totpEnabled",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
down: async (queryInterface) => {
|
|
25
|
+
await queryInterface.removeColumn("DobitUsers", "isPinSet");
|
|
26
|
+
await queryInterface.removeColumn("DobitUsers", "isTotpConfigured");
|
|
27
|
+
},
|
|
28
|
+
};
|
package/models/dobitUser.js
CHANGED
|
@@ -80,6 +80,10 @@ module.exports = (sequelize) => {
|
|
|
80
80
|
type: DataTypes.STRING,
|
|
81
81
|
allowNull: true,
|
|
82
82
|
},
|
|
83
|
+
isPinSet: {
|
|
84
|
+
type: DataTypes.BOOLEAN,
|
|
85
|
+
defaultValue: false,
|
|
86
|
+
},
|
|
83
87
|
nin: {
|
|
84
88
|
type: DataTypes.STRING,
|
|
85
89
|
allowNull: true,
|
|
@@ -135,6 +139,10 @@ module.exports = (sequelize) => {
|
|
|
135
139
|
type: DataTypes.BOOLEAN,
|
|
136
140
|
defaultValue: false,
|
|
137
141
|
},
|
|
142
|
+
isTotpConfigured: {
|
|
143
|
+
type: DataTypes.BOOLEAN,
|
|
144
|
+
defaultValue: false,
|
|
145
|
+
},
|
|
138
146
|
userCreatedby: {
|
|
139
147
|
type: DataTypes.INTEGER.UNSIGNED,
|
|
140
148
|
allowNull: true,
|