vr-migrations 1.0.25 → 1.0.27
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/dist/migrations/{002-create-users.js → 001-create-users.js} +2 -12
- package/dist/seeders/002-users-demo.js +6 -5
- package/package.json +1 -1
- /package/dist/migrations/{001-create-security-clearances.js → 000-create-security-clearances.js} +0 -0
- /package/dist/migrations/{000-create-phoneContacts.js → 002-create-phoneContacts.js} +0 -0
|
@@ -18,7 +18,6 @@ module.exports = {
|
|
|
18
18
|
type: Sequelize.STRING(100),
|
|
19
19
|
allowNull: false,
|
|
20
20
|
},
|
|
21
|
-
// phoneNumber REMOVED - now in phone_contacts
|
|
22
21
|
nationalId: {
|
|
23
22
|
type: Sequelize.STRING(100),
|
|
24
23
|
allowNull: true,
|
|
@@ -52,13 +51,7 @@ module.exports = {
|
|
|
52
51
|
},
|
|
53
52
|
primaryPhoneId: {
|
|
54
53
|
type: Sequelize.UUID,
|
|
55
|
-
allowNull:
|
|
56
|
-
references: {
|
|
57
|
-
model: "phone_contacts",
|
|
58
|
-
key: "id",
|
|
59
|
-
},
|
|
60
|
-
onUpdate: "CASCADE",
|
|
61
|
-
onDelete: "SET NULL",
|
|
54
|
+
allowNull: false,
|
|
62
55
|
},
|
|
63
56
|
isActive: {
|
|
64
57
|
type: Sequelize.BOOLEAN,
|
|
@@ -74,10 +67,7 @@ module.exports = {
|
|
|
74
67
|
type: Sequelize.BOOLEAN,
|
|
75
68
|
defaultValue: false,
|
|
76
69
|
},
|
|
77
|
-
|
|
78
|
-
// verifiedAt REMOVED - now in phone_contacts
|
|
79
|
-
// otp REMOVED - now in phone_contacts
|
|
80
|
-
// otpExpiresAt REMOVED - now in phone_contacts
|
|
70
|
+
|
|
81
71
|
lastLoginAt: {
|
|
82
72
|
type: Sequelize.DATE,
|
|
83
73
|
allowNull: true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const bcrypt = require("bcryptjs");
|
|
3
|
+
const { Sequelize } = require("sequelize");
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
5
6
|
async up(queryInterface) {
|
|
@@ -20,7 +21,7 @@ module.exports = {
|
|
|
20
21
|
verifiedAt: now,
|
|
21
22
|
isPrimary: true,
|
|
22
23
|
isActive: true,
|
|
23
|
-
metadata: {},
|
|
24
|
+
metadata: Sequelize.literal("'{}'::jsonb"), // Fixed: Use Sequelize.literal
|
|
24
25
|
createdAt: now,
|
|
25
26
|
updatedAt: now,
|
|
26
27
|
},
|
|
@@ -32,7 +33,7 @@ module.exports = {
|
|
|
32
33
|
verifiedAt: now,
|
|
33
34
|
isPrimary: true,
|
|
34
35
|
isActive: true,
|
|
35
|
-
metadata: {},
|
|
36
|
+
metadata: Sequelize.literal("'{}'::jsonb"),
|
|
36
37
|
createdAt: now,
|
|
37
38
|
updatedAt: now,
|
|
38
39
|
},
|
|
@@ -44,7 +45,7 @@ module.exports = {
|
|
|
44
45
|
verifiedAt: now,
|
|
45
46
|
isPrimary: true,
|
|
46
47
|
isActive: true,
|
|
47
|
-
metadata: {},
|
|
48
|
+
metadata: Sequelize.literal("'{}'::jsonb"),
|
|
48
49
|
createdAt: now,
|
|
49
50
|
updatedAt: now,
|
|
50
51
|
},
|
|
@@ -56,7 +57,7 @@ module.exports = {
|
|
|
56
57
|
verifiedAt: now,
|
|
57
58
|
isPrimary: true,
|
|
58
59
|
isActive: true,
|
|
59
|
-
metadata: {},
|
|
60
|
+
metadata: Sequelize.literal("'{}'::jsonb"),
|
|
60
61
|
createdAt: now,
|
|
61
62
|
updatedAt: now,
|
|
62
63
|
},
|
|
@@ -68,7 +69,7 @@ module.exports = {
|
|
|
68
69
|
verifiedAt: now,
|
|
69
70
|
isPrimary: true,
|
|
70
71
|
isActive: true,
|
|
71
|
-
metadata: {},
|
|
72
|
+
metadata: Sequelize.literal("'{}'::jsonb"),
|
|
72
73
|
createdAt: now,
|
|
73
74
|
updatedAt: now,
|
|
74
75
|
},
|
package/package.json
CHANGED
/package/dist/migrations/{001-create-security-clearances.js → 000-create-security-clearances.js}
RENAMED
|
File without changes
|
|
File without changes
|