vr-migrations 1.0.9 → 1.0.11
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,
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|