vr-migrations 1.0.28 → 1.0.29
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,7 +7,7 @@ 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
|
userId: {
|
|
@@ -15,10 +15,10 @@ module.exports = {
|
|
|
15
15
|
allowNull: false,
|
|
16
16
|
references: {
|
|
17
17
|
model: "users",
|
|
18
|
-
key: "id"
|
|
18
|
+
key: "id",
|
|
19
19
|
},
|
|
20
20
|
onUpdate: "CASCADE",
|
|
21
|
-
onDelete: "RESTRICT"
|
|
21
|
+
onDelete: "RESTRICT",
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
devicePaymentPlanId: {
|
|
@@ -26,15 +26,15 @@ module.exports = {
|
|
|
26
26
|
allowNull: false,
|
|
27
27
|
references: {
|
|
28
28
|
model: "device_payment_plans",
|
|
29
|
-
key: "id"
|
|
29
|
+
key: "id",
|
|
30
30
|
},
|
|
31
31
|
onUpdate: "CASCADE",
|
|
32
|
-
onDelete: "RESTRICT"
|
|
32
|
+
onDelete: "RESTRICT",
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
transactionId: {
|
|
36
36
|
type: Sequelize.UUID,
|
|
37
|
-
allowNull: true
|
|
37
|
+
allowNull: true,
|
|
38
38
|
},
|
|
39
39
|
|
|
40
40
|
idempotencyKeyId: {
|
|
@@ -42,50 +42,50 @@ module.exports = {
|
|
|
42
42
|
allowNull: true,
|
|
43
43
|
references: {
|
|
44
44
|
model: "idempotency_records",
|
|
45
|
-
key: "id"
|
|
45
|
+
key: "id",
|
|
46
46
|
},
|
|
47
47
|
onUpdate: "CASCADE",
|
|
48
|
-
onDelete: "SET NULL"
|
|
48
|
+
onDelete: "SET NULL",
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
amount: {
|
|
52
52
|
type: Sequelize.FLOAT,
|
|
53
|
-
allowNull: false
|
|
53
|
+
allowNull: false,
|
|
54
54
|
},
|
|
55
55
|
|
|
56
56
|
provider: {
|
|
57
57
|
type: Sequelize.ENUM("mtn_momo", "airtel_money"),
|
|
58
|
-
allowNull: false
|
|
58
|
+
allowNull: false,
|
|
59
59
|
},
|
|
60
60
|
|
|
61
61
|
providerReference: {
|
|
62
62
|
type: Sequelize.STRING,
|
|
63
|
-
allowNull: true
|
|
63
|
+
allowNull: true,
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
status: {
|
|
67
|
-
type: Sequelize.ENUM("
|
|
67
|
+
type: Sequelize.ENUM("PENDING", "SUCCESSFUL", "FAILED"),
|
|
68
68
|
allowNull: false,
|
|
69
|
-
defaultValue: "
|
|
69
|
+
defaultValue: "PENDING",
|
|
70
70
|
},
|
|
71
71
|
|
|
72
72
|
metadata: {
|
|
73
73
|
type: Sequelize.JSONB,
|
|
74
74
|
allowNull: false,
|
|
75
|
-
defaultValue: {}
|
|
75
|
+
defaultValue: {},
|
|
76
76
|
},
|
|
77
77
|
|
|
78
78
|
createdAt: {
|
|
79
79
|
type: Sequelize.DATE,
|
|
80
80
|
allowNull: false,
|
|
81
|
-
defaultValue: Sequelize.fn("NOW")
|
|
81
|
+
defaultValue: Sequelize.fn("NOW"),
|
|
82
82
|
},
|
|
83
83
|
|
|
84
84
|
updatedAt: {
|
|
85
85
|
type: Sequelize.DATE,
|
|
86
86
|
allowNull: false,
|
|
87
|
-
defaultValue: Sequelize.fn("NOW")
|
|
88
|
-
}
|
|
87
|
+
defaultValue: Sequelize.fn("NOW"),
|
|
88
|
+
},
|
|
89
89
|
});
|
|
90
90
|
|
|
91
91
|
await queryInterface.addIndex("payments", ["userId"]);
|
|
@@ -102,5 +102,5 @@ module.exports = {
|
|
|
102
102
|
await queryInterface.sequelize.query(
|
|
103
103
|
'DROP TYPE IF EXISTS "enum_payments_status";'
|
|
104
104
|
);
|
|
105
|
-
}
|
|
105
|
+
},
|
|
106
106
|
};
|