vr-migrations 1.0.8 → 1.0.10

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.
@@ -115,6 +115,16 @@ module.exports = {
115
115
  type: Sequelize.DATE,
116
116
  allowNull: true,
117
117
  },
118
+ deletion: {
119
+ type: Sequelize.JSONB,
120
+ allowNull: false,
121
+ defaultValue: {
122
+ deleted: false,
123
+ deletedAt: null,
124
+ deletedBy: null,
125
+ reason: null,
126
+ },
127
+ },
118
128
  createdAt: {
119
129
  type: Sequelize.DATE,
120
130
  allowNull: false,
@@ -5,6 +5,10 @@ module.exports = {
5
5
  async up(queryInterface) {
6
6
  const now = new Date();
7
7
  const passwordHash = await bcrypt.hash("pass@123", 10);
8
+ const nid_1 = await bcrypt.hash("1199900000000001", 10);
9
+ const nid_2 = await bcrypt.hash("1199900000000002", 10);
10
+ const nid_3 = await bcrypt.hash("1199900000000003", 10);
11
+ const nid_4 = await bcrypt.hash("1199900000000004", 10);
8
12
 
9
13
  await queryInterface.bulkInsert("users", [
10
14
  {
@@ -12,7 +16,7 @@ module.exports = {
12
16
  firstName: "Jean",
13
17
  lastName: "Rider",
14
18
  phoneNumber: "0788000000",
15
- nationalId: await bcrypt.hash("1199900000000000", 10),
19
+ nationalId: nid_1,
16
20
  jacketId: "JACKET-R-001",
17
21
  plateNumber: "RAD101A",
18
22
  securityClearanceId: "11111111-1111-1111-1111-111111111111", // RIDER
@@ -39,7 +43,7 @@ module.exports = {
39
43
  firstName: "Alice",
40
44
  lastName: "Agent",
41
45
  phoneNumber: "0788000002",
42
- nationalId: await bcrypt.hash("1199900000000002", 10),
46
+ nationalId: nid_2,
43
47
  email: "alice@agent.com",
44
48
  password: passwordHash,
45
49
  securityClearanceId: "33333333-3333-3333-3333-333333333333", // AGENT
@@ -53,7 +57,7 @@ module.exports = {
53
57
  firstName: "Eric",
54
58
  lastName: "Admin",
55
59
  phoneNumber: "0788000003",
56
- nationalId: await bcrypt.hash("1199900000000003", 10),
60
+ nationalId: nid_3,
57
61
  email: "eric@admin.com",
58
62
  password: passwordHash,
59
63
  securityClearanceId: "44444444-4444-4444-4444-444444444444", // ADMIN
@@ -69,8 +73,7 @@ module.exports = {
69
73
  phoneNumber: "0788123456",
70
74
  email: "super@admin.com",
71
75
  password: passwordHash,
72
- nationalId:
73
- "$2b$10$eIYz6LR9aVHgeXRDHtOvQ.3NtErrG946q9U1XkRBDa9d6VJG5Scim",
76
+ nationalId: nid_4,
74
77
  plateNumber: null,
75
78
  securityClearanceId: "55555555-5555-5555-5555-555555555555", // SUPER_ADMIN
76
79
  isActive: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-migrations",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Database migration and seeding package for VR applications",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",