vr-migrations 1.0.10 → 1.0.12
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.
|
@@ -7,46 +7,47 @@ module.exports = {
|
|
|
7
7
|
type: Sequelize.UUID,
|
|
8
8
|
defaultValue: Sequelize.UUIDV4,
|
|
9
9
|
primaryKey: true,
|
|
10
|
-
allowNull: false
|
|
10
|
+
allowNull: false,
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
name: {
|
|
14
14
|
type: Sequelize.STRING(100),
|
|
15
|
-
allowNull: false
|
|
15
|
+
allowNull: false,
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
description: {
|
|
19
19
|
type: Sequelize.TEXT,
|
|
20
|
-
allowNull: true
|
|
20
|
+
allowNull: true,
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
stock: {
|
|
24
24
|
type: Sequelize.INTEGER,
|
|
25
25
|
allowNull: false,
|
|
26
|
-
defaultValue: 0
|
|
26
|
+
defaultValue: 0,
|
|
27
27
|
},
|
|
28
|
+
imageUrl: { type: Sequelize.STRING(500), allowNull: true },
|
|
28
29
|
|
|
29
30
|
isActive: {
|
|
30
31
|
type: Sequelize.BOOLEAN,
|
|
31
32
|
allowNull: false,
|
|
32
|
-
defaultValue: true
|
|
33
|
+
defaultValue: true,
|
|
33
34
|
},
|
|
34
35
|
|
|
35
36
|
createdAt: {
|
|
36
37
|
type: Sequelize.DATE,
|
|
37
38
|
allowNull: false,
|
|
38
|
-
defaultValue: Sequelize.fn("NOW")
|
|
39
|
+
defaultValue: Sequelize.fn("NOW"),
|
|
39
40
|
},
|
|
40
41
|
|
|
41
42
|
updatedAt: {
|
|
42
43
|
type: Sequelize.DATE,
|
|
43
44
|
allowNull: false,
|
|
44
|
-
defaultValue: Sequelize.fn("NOW")
|
|
45
|
-
}
|
|
45
|
+
defaultValue: Sequelize.fn("NOW"),
|
|
46
|
+
},
|
|
46
47
|
});
|
|
47
48
|
},
|
|
48
49
|
|
|
49
50
|
async down(queryInterface) {
|
|
50
51
|
await queryInterface.dropTable("products");
|
|
51
|
-
}
|
|
52
|
+
},
|
|
52
53
|
};
|
|
@@ -8,48 +8,53 @@ module.exports = {
|
|
|
8
8
|
type: Sequelize.UUID,
|
|
9
9
|
defaultValue: Sequelize.UUIDV4,
|
|
10
10
|
primaryKey: true,
|
|
11
|
-
allowNull: false
|
|
11
|
+
allowNull: false,
|
|
12
12
|
},
|
|
13
13
|
serialNumber: {
|
|
14
14
|
type: Sequelize.STRING(64),
|
|
15
15
|
allowNull: false,
|
|
16
|
-
unique: true
|
|
16
|
+
unique: true,
|
|
17
17
|
},
|
|
18
18
|
productId: {
|
|
19
19
|
type: Sequelize.UUID,
|
|
20
20
|
allowNull: false,
|
|
21
21
|
references: {
|
|
22
22
|
model: "products",
|
|
23
|
-
key: "id"
|
|
23
|
+
key: "id",
|
|
24
24
|
},
|
|
25
25
|
onUpdate: "CASCADE",
|
|
26
|
-
onDelete: "RESTRICT"
|
|
26
|
+
onDelete: "RESTRICT",
|
|
27
27
|
},
|
|
28
28
|
|
|
29
29
|
status: {
|
|
30
30
|
type: Sequelize.ENUM("locked", "unlocked", "disabled"),
|
|
31
31
|
allowNull: false,
|
|
32
|
-
defaultValue: "locked"
|
|
32
|
+
defaultValue: "locked",
|
|
33
|
+
},
|
|
34
|
+
dedicatedUser: {
|
|
35
|
+
type: Sequelize.ENUM("PASSENGER", "RIDER", "N/A"),
|
|
36
|
+
allowNull: false,
|
|
37
|
+
defaultValue: "N/A",
|
|
33
38
|
},
|
|
34
39
|
isPermanentlyUnlocked: {
|
|
35
40
|
type: Sequelize.BOOLEAN,
|
|
36
41
|
allowNull: false,
|
|
37
|
-
defaultValue: false
|
|
42
|
+
defaultValue: false,
|
|
38
43
|
},
|
|
39
44
|
activatedAt: {
|
|
40
45
|
type: Sequelize.DATE,
|
|
41
|
-
allowNull: true
|
|
46
|
+
allowNull: true,
|
|
42
47
|
},
|
|
43
48
|
createdAt: {
|
|
44
49
|
type: Sequelize.DATE,
|
|
45
50
|
allowNull: false,
|
|
46
|
-
defaultValue: Sequelize.fn("NOW")
|
|
51
|
+
defaultValue: Sequelize.fn("NOW"),
|
|
47
52
|
},
|
|
48
53
|
updatedAt: {
|
|
49
54
|
type: Sequelize.DATE,
|
|
50
55
|
allowNull: false,
|
|
51
|
-
defaultValue: Sequelize.fn("NOW")
|
|
52
|
-
}
|
|
56
|
+
defaultValue: Sequelize.fn("NOW"),
|
|
57
|
+
},
|
|
53
58
|
});
|
|
54
59
|
},
|
|
55
60
|
|
|
@@ -59,5 +64,5 @@ module.exports = {
|
|
|
59
64
|
await queryInterface.sequelize.query(
|
|
60
65
|
'DROP TYPE IF EXISTS "enum_devices_status"'
|
|
61
66
|
);
|
|
62
|
-
}
|
|
67
|
+
},
|
|
63
68
|
};
|
|
@@ -7,17 +7,17 @@ module.exports = {
|
|
|
7
7
|
type: Sequelize.UUID,
|
|
8
8
|
defaultValue: Sequelize.UUIDV4,
|
|
9
9
|
primaryKey: true,
|
|
10
|
-
allowNull: false
|
|
10
|
+
allowNull: false,
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
actorType: {
|
|
14
|
-
type: Sequelize.ENUM("USER", "SYSTEM"),
|
|
15
|
-
allowNull: false
|
|
14
|
+
type: Sequelize.ENUM("USER", "SYSTEM", "ADMIN"),
|
|
15
|
+
allowNull: false,
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
actorId: {
|
|
19
19
|
type: Sequelize.UUID,
|
|
20
|
-
allowNull: true
|
|
20
|
+
allowNull: true,
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
action: {
|
|
@@ -66,40 +66,40 @@ module.exports = {
|
|
|
66
66
|
"SECURITY_CLEARANCE_MANAGED",
|
|
67
67
|
"DEVICE_LOCK_OVERRIDDEN"
|
|
68
68
|
),
|
|
69
|
-
allowNull: false
|
|
69
|
+
allowNull: false,
|
|
70
70
|
},
|
|
71
71
|
|
|
72
72
|
entity: {
|
|
73
73
|
type: Sequelize.STRING(100),
|
|
74
|
-
allowNull: false
|
|
74
|
+
allowNull: false,
|
|
75
75
|
},
|
|
76
76
|
|
|
77
77
|
entityId: {
|
|
78
78
|
type: Sequelize.UUID,
|
|
79
|
-
allowNull: true
|
|
79
|
+
allowNull: true,
|
|
80
80
|
},
|
|
81
81
|
|
|
82
82
|
metadata: {
|
|
83
83
|
type: Sequelize.JSONB,
|
|
84
84
|
allowNull: false,
|
|
85
|
-
defaultValue: {}
|
|
85
|
+
defaultValue: {},
|
|
86
86
|
},
|
|
87
87
|
|
|
88
88
|
ipAddress: {
|
|
89
89
|
type: Sequelize.STRING(45),
|
|
90
|
-
allowNull: true
|
|
90
|
+
allowNull: true,
|
|
91
91
|
},
|
|
92
92
|
|
|
93
93
|
userAgent: {
|
|
94
94
|
type: Sequelize.TEXT,
|
|
95
|
-
allowNull: true
|
|
95
|
+
allowNull: true,
|
|
96
96
|
},
|
|
97
97
|
|
|
98
98
|
createdAt: {
|
|
99
99
|
type: Sequelize.DATE,
|
|
100
100
|
allowNull: false,
|
|
101
|
-
defaultValue: Sequelize.literal("NOW()")
|
|
102
|
-
}
|
|
101
|
+
defaultValue: Sequelize.literal("NOW()"),
|
|
102
|
+
},
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
// Indexes for performance
|
|
@@ -113,5 +113,5 @@ module.exports = {
|
|
|
113
113
|
await queryInterface.sequelize.query(
|
|
114
114
|
'DROP TYPE IF EXISTS "enum_event_logs_actorType";'
|
|
115
115
|
);
|
|
116
|
-
}
|
|
116
|
+
},
|
|
117
117
|
};
|