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.
@@ -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: true,
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
- // verified REMOVED - now in phone_contacts
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-migrations",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Database migration and seeding package for VR applications",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",