@ooneex/typeorm 0.13.0 → 0.14.0
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.
- package/dist/shared/chunk-19qhst35.js +5 -0
- package/dist/shared/{chunk-tqd6ek7s.js.map → chunk-19qhst35.js.map} +2 -2
- package/dist/shared/{chunk-trhrh4e1.js → chunk-31y260d6.js} +24 -89
- package/dist/shared/{chunk-trhrh4e1.js.map → chunk-31y260d6.js.map} +2 -2
- package/dist/shared/chunk-59vwmfpm.js +5 -0
- package/dist/shared/{chunk-r9hsk9fk.js.map → chunk-59vwmfpm.js.map} +1 -1
- package/dist/shared/chunk-5tnqjb3n.js +5 -0
- package/dist/shared/{chunk-2wdazj26.js.map → chunk-5tnqjb3n.js.map} +2 -2
- package/dist/shared/chunk-5ybg5hda.js +5 -0
- package/dist/shared/{chunk-m4mpkr4n.js.map → chunk-5ybg5hda.js.map} +2 -2
- package/dist/shared/chunk-6jnj2pfx.js +5 -0
- package/dist/shared/{chunk-p12g6e7b.js.map → chunk-6jnj2pfx.js.map} +2 -2
- package/dist/shared/chunk-6kdkyjbn.js +5 -0
- package/dist/shared/{chunk-mssxq87m.js.map → chunk-6kdkyjbn.js.map} +2 -2
- package/dist/shared/{chunk-jap9t59k.js → chunk-aj0aak90.js} +14 -52
- package/dist/shared/{chunk-jap9t59k.js.map → chunk-aj0aak90.js.map} +2 -2
- package/dist/shared/chunk-e51ktjsq.js +5 -0
- package/dist/shared/{chunk-efmap3y3.js.map → chunk-e51ktjsq.js.map} +2 -2
- package/dist/shared/{chunk-yszvxhf3.js → chunk-jr0xys18.js} +11 -41
- package/dist/shared/{chunk-yszvxhf3.js.map → chunk-jr0xys18.js.map} +2 -2
- package/dist/shared/chunk-kw4t1san.js +5 -0
- package/dist/shared/{chunk-m9wkjs7v.js.map → chunk-kw4t1san.js.map} +2 -2
- package/dist/shared/chunk-nfv9ce7v.js +5 -0
- package/dist/shared/{chunk-qbn9p4vj.js.map → chunk-nfv9ce7v.js.map} +2 -2
- package/dist/shared/chunk-p22keb3y.js +5 -0
- package/dist/shared/{chunk-bkdccdhn.js.map → chunk-p22keb3y.js.map} +2 -2
- package/dist/shared/chunk-pbns711f.js +5 -0
- package/dist/shared/{chunk-hkfj9j6w.js.map → chunk-pbns711f.js.map} +2 -2
- package/dist/shared/{chunk-6vmvyg0q.js → chunk-qrs0g3m9.js} +17 -58
- package/dist/shared/{chunk-6vmvyg0q.js.map → chunk-qrs0g3m9.js.map} +2 -2
- package/dist/shared/{chunk-eets3mef.js → chunk-qyf32qsz.js} +22 -75
- package/dist/shared/{chunk-eets3mef.js.map → chunk-qyf32qsz.js.map} +2 -2
- package/dist/shared/chunk-t1jad451.js +5 -0
- package/dist/shared/{chunk-cv6xa6qy.js.map → chunk-t1jad451.js.map} +2 -2
- package/dist/shared/chunk-t5cy307m.js +5 -0
- package/dist/shared/{chunk-wg7xcq50.js.map → chunk-t5cy307m.js.map} +2 -2
- package/dist/shared/chunk-x2d798hg.js +5 -0
- package/dist/shared/{chunk-sk8z5zmk.js.map → chunk-x2d798hg.js.map} +2 -2
- package/dist/shared/chunk-x3pmm3na.js +5 -0
- package/dist/shared/{chunk-cwxhwya1.js.map → chunk-x3pmm3na.js.map} +2 -2
- package/dist/shared/chunk-xrqhqgen.js +5 -0
- package/dist/shared/{chunk-chan1evn.js.map → chunk-xrqhqgen.js.map} +2 -2
- package/dist/shared/chunk-xwe8m6av.js +5 -0
- package/dist/shared/{chunk-0swb1h0m.js.map → chunk-xwe8m6av.js.map} +2 -2
- package/dist/shared/chunk-yrwsqc6r.js +5 -0
- package/dist/shared/{chunk-6m3p1ht9.js.map → chunk-yrwsqc6r.js.map} +2 -2
- package/dist/src/entities/book/index.js +2 -34
- package/dist/src/entities/book/index.js.map +1 -1
- package/dist/src/entities/common/index.js +2 -26
- package/dist/src/entities/common/index.js.map +1 -1
- package/dist/src/entities/country/index.js +2 -9
- package/dist/src/entities/country/index.js.map +1 -1
- package/dist/src/entities/currency/index.js +2 -9
- package/dist/src/entities/currency/index.js.map +1 -1
- package/dist/src/entities/folder/index.js +2 -394
- package/dist/src/entities/folder/index.js.map +2 -2
- package/dist/src/entities/gamification/flashcard/index.js +2 -26
- package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
- package/dist/src/entities/gamification/index.js +2 -9
- package/dist/src/entities/gamification/index.js.map +1 -1
- package/dist/src/entities/gamification/mcq/index.js +2 -36
- package/dist/src/entities/gamification/mcq/index.js.map +1 -1
- package/dist/src/entities/image/index.js +2 -31
- package/dist/src/entities/image/index.js.map +1 -1
- package/dist/src/entities/medecine/index.js +2 -13
- package/dist/src/entities/medecine/index.js.map +1 -1
- package/dist/src/entities/payment/index.js +2 -23
- package/dist/src/entities/payment/index.js.map +1 -1
- package/dist/src/entities/user/index.js +2 -30
- package/dist/src/entities/user/index.js.map +1 -1
- package/dist/src/entities/video/index.js +2 -34
- package/dist/src/entities/video/index.js.map +1 -1
- package/dist/src/migrations/book/index.js +137 -541
- package/dist/src/migrations/book/index.js.map +2 -2
- package/dist/src/migrations/common/index.js +14 -63
- package/dist/src/migrations/common/index.js.map +2 -2
- package/dist/src/migrations/country/index.js +13 -48
- package/dist/src/migrations/country/index.js.map +2 -2
- package/dist/src/migrations/currency/index.js +14 -50
- package/dist/src/migrations/currency/index.js.map +2 -2
- package/dist/src/migrations/folder/index.js +104 -426
- package/dist/src/migrations/folder/index.js.map +2 -2
- package/dist/src/migrations/gamification/flashcard/index.js +96 -356
- package/dist/src/migrations/gamification/flashcard/index.js.map +2 -2
- package/dist/src/migrations/gamification/index.js +2 -8
- package/dist/src/migrations/gamification/index.js.map +1 -1
- package/dist/src/migrations/gamification/mcq/index.js +139 -553
- package/dist/src/migrations/gamification/mcq/index.js.map +2 -2
- package/dist/src/migrations/image/index.js +85 -353
- package/dist/src/migrations/image/index.js.map +2 -2
- package/dist/src/migrations/medecine/index.js +36 -132
- package/dist/src/migrations/medecine/index.js.map +2 -2
- package/dist/src/migrations/payment/index.js +94 -339
- package/dist/src/migrations/payment/index.js.map +2 -2
- package/dist/src/migrations/user/index.js +39 -331
- package/dist/src/migrations/user/index.js.map +2 -2
- package/dist/src/migrations/video/index.js +17 -345
- package/dist/src/migrations/video/index.js.map +2 -2
- package/dist/src/repositories/book/index.js +2 -997
- package/dist/src/repositories/book/index.js.map +2 -2
- package/dist/src/repositories/common/index.js +2 -439
- package/dist/src/repositories/common/index.js.map +2 -2
- package/dist/src/repositories/country/index.js +2 -89
- package/dist/src/repositories/country/index.js.map +2 -2
- package/dist/src/repositories/currency/index.js +2 -89
- package/dist/src/repositories/currency/index.js.map +2 -2
- package/dist/src/repositories/gamification/flashcard/index.js +2 -632
- package/dist/src/repositories/gamification/flashcard/index.js.map +2 -2
- package/dist/src/repositories/gamification/index.js +2 -160
- package/dist/src/repositories/gamification/index.js.map +2 -2
- package/dist/src/repositories/gamification/mcq/index.js +2 -1017
- package/dist/src/repositories/gamification/mcq/index.js.map +2 -2
- package/dist/src/repositories/image/index.js +2 -800
- package/dist/src/repositories/image/index.js.map +2 -2
- package/dist/src/repositories/medecine/index.js +2 -243
- package/dist/src/repositories/medecine/index.js.map +2 -2
- package/dist/src/repositories/payment/index.js +2 -560
- package/dist/src/repositories/payment/index.js.map +2 -2
- package/dist/src/repositories/user/index.js +2 -999
- package/dist/src/repositories/user/index.js.map +2 -2
- package/dist/src/repositories/video/index.js +2 -975
- package/dist/src/repositories/video/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/shared/chunk-0swb1h0m.js +0 -51
- package/dist/shared/chunk-2wdazj26.js +0 -371
- package/dist/shared/chunk-6m3p1ht9.js +0 -606
- package/dist/shared/chunk-bkdccdhn.js +0 -105
- package/dist/shared/chunk-chan1evn.js +0 -72
- package/dist/shared/chunk-cv6xa6qy.js +0 -621
- package/dist/shared/chunk-cwxhwya1.js +0 -548
- package/dist/shared/chunk-efmap3y3.js +0 -345
- package/dist/shared/chunk-hkfj9j6w.js +0 -30
- package/dist/shared/chunk-m4mpkr4n.js +0 -34
- package/dist/shared/chunk-m9wkjs7v.js +0 -639
- package/dist/shared/chunk-mssxq87m.js +0 -195
- package/dist/shared/chunk-p12g6e7b.js +0 -38
- package/dist/shared/chunk-qbn9p4vj.js +0 -835
- package/dist/shared/chunk-r9hsk9fk.js +0 -20
- package/dist/shared/chunk-sk8z5zmk.js +0 -112
- package/dist/shared/chunk-tqd6ek7s.js +0 -86
- package/dist/shared/chunk-wg7xcq50.js +0 -38
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
Migration20251225181613479
|
|
4
|
-
} from "../../../shared/chunk-eets3mef.js";
|
|
5
|
-
import {
|
|
6
|
-
Migration20251225173352645
|
|
7
|
-
} from "../../../shared/chunk-6vmvyg0q.js";
|
|
8
|
-
import {
|
|
9
|
-
Migration20251225173351645
|
|
10
|
-
} from "../../../shared/chunk-jap9t59k.js";
|
|
11
|
-
import"../../../shared/chunk-trhrh4e1.js";
|
|
12
|
-
import {
|
|
13
|
-
__legacyDecorateClassTS
|
|
14
|
-
} from "../../../shared/chunk-r9hsk9fk.js";
|
|
15
|
-
|
|
16
|
-
// src/migrations/payment/Migration20251225182218185.ts
|
|
17
|
-
import { decorator } from "@ooneex/migrations";
|
|
18
|
-
class Migration20251225182218185 {
|
|
19
|
-
async up(tx) {
|
|
20
|
-
await tx`
|
|
2
|
+
import{a as o}from"../../../shared/chunk-qyf32qsz.js";import{b as T}from"../../../shared/chunk-qrs0g3m9.js";import{c as n}from"../../../shared/chunk-aj0aak90.js";import"../../../shared/chunk-31y260d6.js";import{Ha as e}from"../../../shared/chunk-59vwmfpm.js";import{decorator as c}from"@ooneex/migrations";class E{async up(a){await a`
|
|
21
3
|
CREATE TABLE IF NOT EXISTS payment_features (
|
|
22
4
|
id VARCHAR(25) PRIMARY KEY,
|
|
23
5
|
name VARCHAR(255) NOT NULL,
|
|
@@ -35,47 +17,21 @@ class Migration20251225182218185 {
|
|
|
35
17
|
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
36
18
|
deleted_at TIMESTAMPTZ
|
|
37
19
|
)
|
|
38
|
-
|
|
39
|
-
await tx`
|
|
20
|
+
`,await a`
|
|
40
21
|
CREATE INDEX IF NOT EXISTS idx_payment_features_name ON payment_features(name)
|
|
41
|
-
|
|
42
|
-
await tx`
|
|
22
|
+
`,await a`
|
|
43
23
|
CREATE INDEX IF NOT EXISTS idx_payment_features_is_enabled ON payment_features(is_enabled)
|
|
44
|
-
|
|
45
|
-
await tx`
|
|
24
|
+
`,await a`
|
|
46
25
|
CREATE INDEX IF NOT EXISTS idx_payment_features_language ON payment_features(language)
|
|
47
|
-
|
|
48
|
-
await tx`
|
|
26
|
+
`,await a`
|
|
49
27
|
CREATE INDEX IF NOT EXISTS idx_payment_features_deleted_at ON payment_features(deleted_at)
|
|
50
|
-
|
|
51
|
-
await tx`
|
|
28
|
+
`,await a`
|
|
52
29
|
CREATE INDEX IF NOT EXISTS idx_payment_features_is_public ON payment_features(is_public) WHERE deleted_at IS NULL
|
|
53
|
-
|
|
54
|
-
await tx`
|
|
30
|
+
`,await a`
|
|
55
31
|
CREATE INDEX IF NOT EXISTS idx_payment_features_created_at ON payment_features(created_at DESC)
|
|
56
|
-
|
|
57
|
-
await tx`
|
|
32
|
+
`,await a`
|
|
58
33
|
CREATE INDEX IF NOT EXISTS idx_payment_features_active ON payment_features(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
async down(tx) {
|
|
62
|
-
await tx`DROP TABLE IF EXISTS payment_features CASCADE`;
|
|
63
|
-
}
|
|
64
|
-
getVersion() {
|
|
65
|
-
return "20251225182218185";
|
|
66
|
-
}
|
|
67
|
-
getDependencies() {
|
|
68
|
-
return [];
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
Migration20251225182218185 = __legacyDecorateClassTS([
|
|
72
|
-
decorator.migration()
|
|
73
|
-
], Migration20251225182218185);
|
|
74
|
-
// src/migrations/payment/Migration20251225182218188.ts
|
|
75
|
-
import { decorator as decorator2 } from "@ooneex/migrations";
|
|
76
|
-
class Migration20251225182218188 {
|
|
77
|
-
async up(tx) {
|
|
78
|
-
await tx`
|
|
34
|
+
`}async down(a){await a`DROP TABLE IF EXISTS payment_features CASCADE`}getVersion(){return"20251225182218185"}getDependencies(){return[]}}E=e([c.migration()],E);import{decorator as d}from"@ooneex/migrations";class t{async up(a){await a`
|
|
79
35
|
CREATE TABLE IF NOT EXISTS payment_products (
|
|
80
36
|
id VARCHAR(25) PRIMARY KEY,
|
|
81
37
|
name VARCHAR(255) NOT NULL,
|
|
@@ -95,8 +51,7 @@ class Migration20251225182218188 {
|
|
|
95
51
|
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
96
52
|
deleted_at TIMESTAMPTZ
|
|
97
53
|
)
|
|
98
|
-
|
|
99
|
-
await tx`
|
|
54
|
+
`,await a`
|
|
100
55
|
CREATE TABLE IF NOT EXISTS payment_products_categories (
|
|
101
56
|
product_id VARCHAR(25) NOT NULL,
|
|
102
57
|
category_id VARCHAR(25) NOT NULL,
|
|
@@ -104,8 +59,7 @@ class Migration20251225182218188 {
|
|
|
104
59
|
CONSTRAINT fk_payment_products_categories_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,
|
|
105
60
|
CONSTRAINT fk_payment_products_categories_category FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE CASCADE
|
|
106
61
|
)
|
|
107
|
-
|
|
108
|
-
await tx`
|
|
62
|
+
`,await a`
|
|
109
63
|
CREATE TABLE IF NOT EXISTS payment_products_images (
|
|
110
64
|
product_id VARCHAR(25) NOT NULL,
|
|
111
65
|
image_id VARCHAR(25) NOT NULL,
|
|
@@ -113,8 +67,7 @@ class Migration20251225182218188 {
|
|
|
113
67
|
CONSTRAINT fk_payment_products_images_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,
|
|
114
68
|
CONSTRAINT fk_payment_products_images_image FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE
|
|
115
69
|
)
|
|
116
|
-
|
|
117
|
-
await tx`
|
|
70
|
+
`,await a`
|
|
118
71
|
CREATE TABLE IF NOT EXISTS payment_products_tags (
|
|
119
72
|
product_id VARCHAR(25) NOT NULL,
|
|
120
73
|
tag_id VARCHAR(25) NOT NULL,
|
|
@@ -122,81 +75,39 @@ class Migration20251225182218188 {
|
|
|
122
75
|
CONSTRAINT fk_payment_products_tags_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE,
|
|
123
76
|
CONSTRAINT fk_payment_products_tags_tag FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
|
|
124
77
|
)
|
|
125
|
-
|
|
126
|
-
await tx`
|
|
78
|
+
`,await a`
|
|
127
79
|
CREATE INDEX IF NOT EXISTS idx_payment_products_name ON payment_products(name)
|
|
128
|
-
|
|
129
|
-
await tx`
|
|
80
|
+
`,await a`
|
|
130
81
|
CREATE INDEX IF NOT EXISTS idx_payment_products_currency ON payment_products(currency)
|
|
131
|
-
|
|
132
|
-
await tx`
|
|
82
|
+
`,await a`
|
|
133
83
|
CREATE INDEX IF NOT EXISTS idx_payment_products_price ON payment_products(price)
|
|
134
|
-
|
|
135
|
-
await tx`
|
|
84
|
+
`,await a`
|
|
136
85
|
CREATE INDEX IF NOT EXISTS idx_payment_products_barcode ON payment_products(barcode)
|
|
137
|
-
|
|
138
|
-
await tx`
|
|
86
|
+
`,await a`
|
|
139
87
|
CREATE INDEX IF NOT EXISTS idx_payment_products_language ON payment_products(language)
|
|
140
|
-
|
|
141
|
-
await tx`
|
|
88
|
+
`,await a`
|
|
142
89
|
CREATE INDEX IF NOT EXISTS idx_payment_products_deleted_at ON payment_products(deleted_at)
|
|
143
|
-
|
|
144
|
-
await tx`
|
|
90
|
+
`,await a`
|
|
145
91
|
CREATE INDEX IF NOT EXISTS idx_payment_products_is_public ON payment_products(is_public) WHERE deleted_at IS NULL
|
|
146
|
-
|
|
147
|
-
await tx`
|
|
92
|
+
`,await a`
|
|
148
93
|
CREATE INDEX IF NOT EXISTS idx_payment_products_created_at ON payment_products(created_at DESC)
|
|
149
|
-
|
|
150
|
-
await tx`
|
|
94
|
+
`,await a`
|
|
151
95
|
CREATE INDEX IF NOT EXISTS idx_payment_products_active ON payment_products(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
152
|
-
|
|
153
|
-
await tx`
|
|
96
|
+
`,await a`
|
|
154
97
|
CREATE INDEX IF NOT EXISTS idx_payment_products_categories_product_id ON payment_products_categories(product_id)
|
|
155
|
-
|
|
156
|
-
await tx`
|
|
98
|
+
`,await a`
|
|
157
99
|
CREATE INDEX IF NOT EXISTS idx_payment_products_categories_category_id ON payment_products_categories(category_id)
|
|
158
|
-
|
|
159
|
-
await tx`
|
|
100
|
+
`,await a`
|
|
160
101
|
CREATE INDEX IF NOT EXISTS idx_payment_products_images_product_id ON payment_products_images(product_id)
|
|
161
|
-
|
|
162
|
-
await tx`
|
|
102
|
+
`,await a`
|
|
163
103
|
CREATE INDEX IF NOT EXISTS idx_payment_products_images_image_id ON payment_products_images(image_id)
|
|
164
|
-
|
|
165
|
-
await tx`
|
|
104
|
+
`,await a`
|
|
166
105
|
CREATE INDEX IF NOT EXISTS idx_payment_products_tags_product_id ON payment_products_tags(product_id)
|
|
167
|
-
|
|
168
|
-
await tx`
|
|
106
|
+
`,await a`
|
|
169
107
|
CREATE INDEX IF NOT EXISTS idx_payment_products_tags_tag_id ON payment_products_tags(tag_id)
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
async down(tx) {
|
|
173
|
-
await tx`DROP TABLE IF EXISTS payment_products_tags CASCADE`;
|
|
174
|
-
await tx`DROP TABLE IF EXISTS payment_products_images CASCADE`;
|
|
175
|
-
await tx`DROP TABLE IF EXISTS payment_products_categories CASCADE`;
|
|
176
|
-
await tx`DROP TABLE IF EXISTS payment_products CASCADE`;
|
|
177
|
-
}
|
|
178
|
-
getVersion() {
|
|
179
|
-
return "20251225182218188";
|
|
180
|
-
}
|
|
181
|
-
getDependencies() {
|
|
182
|
-
return [
|
|
183
|
-
Migration20251225173352645,
|
|
184
|
-
Migration20251225181613479,
|
|
185
|
-
Migration20251225173351645
|
|
186
|
-
];
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
Migration20251225182218188 = __legacyDecorateClassTS([
|
|
190
|
-
decorator2.migration()
|
|
191
|
-
], Migration20251225182218188);
|
|
192
|
-
// src/migrations/payment/Migration20251225182218190.ts
|
|
193
|
-
import { decorator as decorator3 } from "@ooneex/migrations";
|
|
194
|
-
class Migration20251225182218190 {
|
|
195
|
-
async up(tx) {
|
|
196
|
-
await tx`
|
|
108
|
+
`}async down(a){await a`DROP TABLE IF EXISTS payment_products_tags CASCADE`,await a`DROP TABLE IF EXISTS payment_products_images CASCADE`,await a`DROP TABLE IF EXISTS payment_products_categories CASCADE`,await a`DROP TABLE IF EXISTS payment_products CASCADE`}getVersion(){return"20251225182218188"}getDependencies(){return[T,o,n]}}t=e([d.migration()],t);import{decorator as N}from"@ooneex/migrations";class i{async up(a){await a`
|
|
197
109
|
CREATE TYPE subscription_period AS ENUM ('monthly', 'yearly', 'weekly', 'daily')
|
|
198
|
-
|
|
199
|
-
await tx`
|
|
110
|
+
`,await a`
|
|
200
111
|
CREATE TABLE IF NOT EXISTS payment_plans (
|
|
201
112
|
id VARCHAR(25) PRIMARY KEY,
|
|
202
113
|
name VARCHAR(255) NOT NULL,
|
|
@@ -218,8 +129,7 @@ class Migration20251225182218190 {
|
|
|
218
129
|
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
219
130
|
deleted_at TIMESTAMPTZ
|
|
220
131
|
)
|
|
221
|
-
|
|
222
|
-
await tx`
|
|
132
|
+
`,await a`
|
|
223
133
|
CREATE TABLE IF NOT EXISTS payment_plans_features (
|
|
224
134
|
plan_id VARCHAR(25) NOT NULL,
|
|
225
135
|
feature_id VARCHAR(25) NOT NULL,
|
|
@@ -227,72 +137,35 @@ class Migration20251225182218190 {
|
|
|
227
137
|
CONSTRAINT fk_payment_plans_features_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE,
|
|
228
138
|
CONSTRAINT fk_payment_plans_features_feature FOREIGN KEY (feature_id) REFERENCES payment_features(id) ON DELETE CASCADE
|
|
229
139
|
)
|
|
230
|
-
|
|
231
|
-
await tx`
|
|
140
|
+
`,await a`
|
|
232
141
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_name ON payment_plans(name)
|
|
233
|
-
|
|
234
|
-
await tx`
|
|
142
|
+
`,await a`
|
|
235
143
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_currency ON payment_plans(currency)
|
|
236
|
-
|
|
237
|
-
await tx`
|
|
144
|
+
`,await a`
|
|
238
145
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_price ON payment_plans(price)
|
|
239
|
-
|
|
240
|
-
await tx`
|
|
146
|
+
`,await a`
|
|
241
147
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_period ON payment_plans(period)
|
|
242
|
-
|
|
243
|
-
await tx`
|
|
148
|
+
`,await a`
|
|
244
149
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_is_active ON payment_plans(is_active)
|
|
245
|
-
|
|
246
|
-
await tx`
|
|
150
|
+
`,await a`
|
|
247
151
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_language ON payment_plans(language)
|
|
248
|
-
|
|
249
|
-
await tx`
|
|
152
|
+
`,await a`
|
|
250
153
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_deleted_at ON payment_plans(deleted_at)
|
|
251
|
-
|
|
252
|
-
await tx`
|
|
154
|
+
`,await a`
|
|
253
155
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_is_public ON payment_plans(is_public) WHERE deleted_at IS NULL
|
|
254
|
-
|
|
255
|
-
await tx`
|
|
156
|
+
`,await a`
|
|
256
157
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_created_at ON payment_plans(created_at DESC)
|
|
257
|
-
|
|
258
|
-
await tx`
|
|
158
|
+
`,await a`
|
|
259
159
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_active ON payment_plans(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
260
|
-
|
|
261
|
-
await tx`
|
|
160
|
+
`,await a`
|
|
262
161
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_active_plans ON payment_plans(is_active, price) WHERE deleted_at IS NULL AND is_active = true
|
|
263
|
-
|
|
264
|
-
await tx`
|
|
162
|
+
`,await a`
|
|
265
163
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_features_plan_id ON payment_plans_features(plan_id)
|
|
266
|
-
|
|
267
|
-
await tx`
|
|
164
|
+
`,await a`
|
|
268
165
|
CREATE INDEX IF NOT EXISTS idx_payment_plans_features_feature_id ON payment_plans_features(feature_id)
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
async down(tx) {
|
|
272
|
-
await tx`DROP TABLE IF EXISTS payment_plans_features CASCADE`;
|
|
273
|
-
await tx`DROP TABLE IF EXISTS payment_plans CASCADE`;
|
|
274
|
-
await tx`DROP TYPE IF EXISTS subscription_period CASCADE`;
|
|
275
|
-
}
|
|
276
|
-
getVersion() {
|
|
277
|
-
return "20251225182218190";
|
|
278
|
-
}
|
|
279
|
-
getDependencies() {
|
|
280
|
-
return [
|
|
281
|
-
Migration20251225182218185
|
|
282
|
-
];
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
Migration20251225182218190 = __legacyDecorateClassTS([
|
|
286
|
-
decorator3.migration()
|
|
287
|
-
], Migration20251225182218190);
|
|
288
|
-
// src/migrations/payment/Migration20251225182218192.ts
|
|
289
|
-
import { decorator as decorator4 } from "@ooneex/migrations";
|
|
290
|
-
class Migration20251225182218192 {
|
|
291
|
-
async up(tx) {
|
|
292
|
-
await tx`
|
|
166
|
+
`}async down(a){await a`DROP TABLE IF EXISTS payment_plans_features CASCADE`,await a`DROP TABLE IF EXISTS payment_plans CASCADE`,await a`DROP TYPE IF EXISTS subscription_period CASCADE`}getVersion(){return"20251225182218190"}getDependencies(){return[E]}}i=e([N.migration()],i);import{decorator as r}from"@ooneex/migrations";class _{async up(a){await a`
|
|
293
167
|
CREATE TYPE discount_type AS ENUM ('percentage', 'fixed')
|
|
294
|
-
|
|
295
|
-
await tx`
|
|
168
|
+
`,await a`
|
|
296
169
|
CREATE TABLE IF NOT EXISTS payment_coupons (
|
|
297
170
|
id VARCHAR(25) PRIMARY KEY,
|
|
298
171
|
code VARCHAR(50) NOT NULL UNIQUE,
|
|
@@ -318,8 +191,7 @@ class Migration20251225182218192 {
|
|
|
318
191
|
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
319
192
|
deleted_at TIMESTAMPTZ
|
|
320
193
|
)
|
|
321
|
-
|
|
322
|
-
await tx`
|
|
194
|
+
`,await a`
|
|
323
195
|
CREATE TABLE IF NOT EXISTS payment_coupons_applicable_products (
|
|
324
196
|
coupon_id VARCHAR(25) NOT NULL,
|
|
325
197
|
product_id VARCHAR(25) NOT NULL,
|
|
@@ -327,8 +199,7 @@ class Migration20251225182218192 {
|
|
|
327
199
|
CONSTRAINT fk_payment_coupons_applicable_products_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE,
|
|
328
200
|
CONSTRAINT fk_payment_coupons_applicable_products_product FOREIGN KEY (product_id) REFERENCES payment_products(id) ON DELETE CASCADE
|
|
329
201
|
)
|
|
330
|
-
|
|
331
|
-
await tx`
|
|
202
|
+
`,await a`
|
|
332
203
|
CREATE TABLE IF NOT EXISTS payment_coupons_applicable_plans (
|
|
333
204
|
coupon_id VARCHAR(25) NOT NULL,
|
|
334
205
|
plan_id VARCHAR(25) NOT NULL,
|
|
@@ -336,77 +207,37 @@ class Migration20251225182218192 {
|
|
|
336
207
|
CONSTRAINT fk_payment_coupons_applicable_plans_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE,
|
|
337
208
|
CONSTRAINT fk_payment_coupons_applicable_plans_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE
|
|
338
209
|
)
|
|
339
|
-
|
|
340
|
-
await tx`
|
|
210
|
+
`,await a`
|
|
341
211
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_code ON payment_coupons(code)
|
|
342
|
-
|
|
343
|
-
await tx`
|
|
212
|
+
`,await a`
|
|
344
213
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_discount_type ON payment_coupons(discount_type)
|
|
345
|
-
|
|
346
|
-
await tx`
|
|
214
|
+
`,await a`
|
|
347
215
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_is_active ON payment_coupons(is_active)
|
|
348
|
-
|
|
349
|
-
await tx`
|
|
216
|
+
`,await a`
|
|
350
217
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_start_at ON payment_coupons(start_at)
|
|
351
|
-
|
|
352
|
-
await tx`
|
|
218
|
+
`,await a`
|
|
353
219
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_end_at ON payment_coupons(end_at)
|
|
354
|
-
|
|
355
|
-
await tx`
|
|
220
|
+
`,await a`
|
|
356
221
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_language ON payment_coupons(language)
|
|
357
|
-
|
|
358
|
-
await tx`
|
|
222
|
+
`,await a`
|
|
359
223
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_deleted_at ON payment_coupons(deleted_at)
|
|
360
|
-
|
|
361
|
-
await tx`
|
|
224
|
+
`,await a`
|
|
362
225
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_is_public ON payment_coupons(is_public) WHERE deleted_at IS NULL
|
|
363
|
-
|
|
364
|
-
await tx`
|
|
226
|
+
`,await a`
|
|
365
227
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_created_at ON payment_coupons(created_at DESC)
|
|
366
|
-
|
|
367
|
-
await tx`
|
|
228
|
+
`,await a`
|
|
368
229
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_active ON payment_coupons(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
369
|
-
|
|
370
|
-
await tx`
|
|
230
|
+
`,await a`
|
|
371
231
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_valid ON payment_coupons(is_active, start_at, end_at) WHERE deleted_at IS NULL AND is_active = true AND (start_at IS NULL OR start_at <= CURRENT_TIMESTAMP) AND (end_at IS NULL OR end_at >= CURRENT_TIMESTAMP)
|
|
372
|
-
|
|
373
|
-
await tx`
|
|
232
|
+
`,await a`
|
|
374
233
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_products_coupon_id ON payment_coupons_applicable_products(coupon_id)
|
|
375
|
-
|
|
376
|
-
await tx`
|
|
234
|
+
`,await a`
|
|
377
235
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_products_product_id ON payment_coupons_applicable_products(product_id)
|
|
378
|
-
|
|
379
|
-
await tx`
|
|
236
|
+
`,await a`
|
|
380
237
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_plans_coupon_id ON payment_coupons_applicable_plans(coupon_id)
|
|
381
|
-
|
|
382
|
-
await tx`
|
|
238
|
+
`,await a`
|
|
383
239
|
CREATE INDEX IF NOT EXISTS idx_payment_coupons_applicable_plans_plan_id ON payment_coupons_applicable_plans(plan_id)
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
async down(tx) {
|
|
387
|
-
await tx`DROP TABLE IF EXISTS payment_coupons_applicable_plans CASCADE`;
|
|
388
|
-
await tx`DROP TABLE IF EXISTS payment_coupons_applicable_products CASCADE`;
|
|
389
|
-
await tx`DROP TABLE IF EXISTS payment_coupons CASCADE`;
|
|
390
|
-
await tx`DROP TYPE IF EXISTS discount_type CASCADE`;
|
|
391
|
-
}
|
|
392
|
-
getVersion() {
|
|
393
|
-
return "20251225182218192";
|
|
394
|
-
}
|
|
395
|
-
getDependencies() {
|
|
396
|
-
return [
|
|
397
|
-
Migration20251225182218188,
|
|
398
|
-
Migration20251225182218190
|
|
399
|
-
];
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
Migration20251225182218192 = __legacyDecorateClassTS([
|
|
403
|
-
decorator4.migration()
|
|
404
|
-
], Migration20251225182218192);
|
|
405
|
-
// src/migrations/payment/Migration20251225182218195.ts
|
|
406
|
-
import { decorator as decorator5 } from "@ooneex/migrations";
|
|
407
|
-
class Migration20251225182218195 {
|
|
408
|
-
async up(tx) {
|
|
409
|
-
await tx`
|
|
240
|
+
`}async down(a){await a`DROP TABLE IF EXISTS payment_coupons_applicable_plans CASCADE`,await a`DROP TABLE IF EXISTS payment_coupons_applicable_products CASCADE`,await a`DROP TABLE IF EXISTS payment_coupons CASCADE`,await a`DROP TYPE IF EXISTS discount_type CASCADE`}getVersion(){return"20251225182218192"}getDependencies(){return[t,i]}}_=e([r.migration()],_);import{decorator as I}from"@ooneex/migrations";class s{async up(a){await a`
|
|
410
241
|
CREATE TABLE IF NOT EXISTS payment_credits (
|
|
411
242
|
id VARCHAR(25) PRIMARY KEY,
|
|
412
243
|
balance DECIMAL(10, 2) NOT NULL,
|
|
@@ -424,53 +255,25 @@ class Migration20251225182218195 {
|
|
|
424
255
|
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
425
256
|
deleted_at TIMESTAMPTZ
|
|
426
257
|
)
|
|
427
|
-
|
|
428
|
-
await tx`
|
|
258
|
+
`,await a`
|
|
429
259
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_balance ON payment_credits(balance)
|
|
430
|
-
|
|
431
|
-
await tx`
|
|
260
|
+
`,await a`
|
|
432
261
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_currency ON payment_credits(currency)
|
|
433
|
-
|
|
434
|
-
await tx`
|
|
262
|
+
`,await a`
|
|
435
263
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_expires_at ON payment_credits(expires_at)
|
|
436
|
-
|
|
437
|
-
await tx`
|
|
264
|
+
`,await a`
|
|
438
265
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_language ON payment_credits(language)
|
|
439
|
-
|
|
440
|
-
await tx`
|
|
266
|
+
`,await a`
|
|
441
267
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_deleted_at ON payment_credits(deleted_at)
|
|
442
|
-
|
|
443
|
-
await tx`
|
|
268
|
+
`,await a`
|
|
444
269
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_is_public ON payment_credits(is_public) WHERE deleted_at IS NULL
|
|
445
|
-
|
|
446
|
-
await tx`
|
|
270
|
+
`,await a`
|
|
447
271
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_created_at ON payment_credits(created_at DESC)
|
|
448
|
-
|
|
449
|
-
await tx`
|
|
272
|
+
`,await a`
|
|
450
273
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_active ON payment_credits(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
451
|
-
|
|
452
|
-
await tx`
|
|
274
|
+
`,await a`
|
|
453
275
|
CREATE INDEX IF NOT EXISTS idx_payment_credits_valid ON payment_credits(expires_at) WHERE deleted_at IS NULL AND (expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP)
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
async down(tx) {
|
|
457
|
-
await tx`DROP TABLE IF EXISTS payment_credits CASCADE`;
|
|
458
|
-
}
|
|
459
|
-
getVersion() {
|
|
460
|
-
return "20251225182218195";
|
|
461
|
-
}
|
|
462
|
-
getDependencies() {
|
|
463
|
-
return [];
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
Migration20251225182218195 = __legacyDecorateClassTS([
|
|
467
|
-
decorator5.migration()
|
|
468
|
-
], Migration20251225182218195);
|
|
469
|
-
// src/migrations/payment/Migration20251225182218197.ts
|
|
470
|
-
import { decorator as decorator6 } from "@ooneex/migrations";
|
|
471
|
-
class Migration20251225182218197 {
|
|
472
|
-
async up(tx) {
|
|
473
|
-
await tx`
|
|
276
|
+
`}async down(a){await a`DROP TABLE IF EXISTS payment_credits CASCADE`}getVersion(){return"20251225182218195"}getDependencies(){return[]}}s=e([I.migration()],s);import{decorator as A}from"@ooneex/migrations";class p{async up(a){await a`
|
|
474
277
|
CREATE TABLE IF NOT EXISTS payment_subscriptions (
|
|
475
278
|
id VARCHAR(25) PRIMARY KEY,
|
|
476
279
|
start_at TIMESTAMPTZ NOT NULL,
|
|
@@ -488,8 +291,7 @@ class Migration20251225182218197 {
|
|
|
488
291
|
updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
489
292
|
deleted_at TIMESTAMPTZ
|
|
490
293
|
)
|
|
491
|
-
|
|
492
|
-
await tx`
|
|
294
|
+
`,await a`
|
|
493
295
|
CREATE TABLE IF NOT EXISTS payment_subscriptions_coupons (
|
|
494
296
|
subscription_id VARCHAR(25) NOT NULL,
|
|
495
297
|
coupon_id VARCHAR(25) NOT NULL,
|
|
@@ -497,8 +299,7 @@ class Migration20251225182218197 {
|
|
|
497
299
|
CONSTRAINT fk_payment_subscriptions_coupons_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,
|
|
498
300
|
CONSTRAINT fk_payment_subscriptions_coupons_coupon FOREIGN KEY (coupon_id) REFERENCES payment_coupons(id) ON DELETE CASCADE
|
|
499
301
|
)
|
|
500
|
-
|
|
501
|
-
await tx`
|
|
302
|
+
`,await a`
|
|
502
303
|
CREATE TABLE IF NOT EXISTS payment_subscriptions_plans (
|
|
503
304
|
subscription_id VARCHAR(25) NOT NULL,
|
|
504
305
|
plan_id VARCHAR(25) NOT NULL,
|
|
@@ -506,8 +307,7 @@ class Migration20251225182218197 {
|
|
|
506
307
|
CONSTRAINT fk_payment_subscriptions_plans_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,
|
|
507
308
|
CONSTRAINT fk_payment_subscriptions_plans_plan FOREIGN KEY (plan_id) REFERENCES payment_plans(id) ON DELETE CASCADE
|
|
508
309
|
)
|
|
509
|
-
|
|
510
|
-
await tx`
|
|
310
|
+
`,await a`
|
|
511
311
|
CREATE TABLE IF NOT EXISTS payment_subscriptions_credits (
|
|
512
312
|
subscription_id VARCHAR(25) NOT NULL,
|
|
513
313
|
credit_id VARCHAR(25) NOT NULL,
|
|
@@ -515,83 +315,38 @@ class Migration20251225182218197 {
|
|
|
515
315
|
CONSTRAINT fk_payment_subscriptions_credits_subscription FOREIGN KEY (subscription_id) REFERENCES payment_subscriptions(id) ON DELETE CASCADE,
|
|
516
316
|
CONSTRAINT fk_payment_subscriptions_credits_credit FOREIGN KEY (credit_id) REFERENCES payment_credits(id) ON DELETE CASCADE
|
|
517
317
|
)
|
|
518
|
-
|
|
519
|
-
await tx`
|
|
318
|
+
`,await a`
|
|
520
319
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_start_at ON payment_subscriptions(start_at DESC)
|
|
521
|
-
|
|
522
|
-
await tx`
|
|
320
|
+
`,await a`
|
|
523
321
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_end_at ON payment_subscriptions(end_at)
|
|
524
|
-
|
|
525
|
-
await tx`
|
|
322
|
+
`,await a`
|
|
526
323
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_trial ON payment_subscriptions(is_trial)
|
|
527
|
-
|
|
528
|
-
await tx`
|
|
324
|
+
`,await a`
|
|
529
325
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_active ON payment_subscriptions(is_active)
|
|
530
|
-
|
|
531
|
-
await tx`
|
|
326
|
+
`,await a`
|
|
532
327
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_language ON payment_subscriptions(language)
|
|
533
|
-
|
|
534
|
-
await tx`
|
|
328
|
+
`,await a`
|
|
535
329
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_deleted_at ON payment_subscriptions(deleted_at)
|
|
536
|
-
|
|
537
|
-
await tx`
|
|
330
|
+
`,await a`
|
|
538
331
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_is_public ON payment_subscriptions(is_public) WHERE deleted_at IS NULL
|
|
539
|
-
|
|
540
|
-
await tx`
|
|
332
|
+
`,await a`
|
|
541
333
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_created_at ON payment_subscriptions(created_at DESC)
|
|
542
|
-
|
|
543
|
-
await tx`
|
|
334
|
+
`,await a`
|
|
544
335
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_active ON payment_subscriptions(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
|
|
545
|
-
|
|
546
|
-
await tx`
|
|
336
|
+
`,await a`
|
|
547
337
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_active_subs ON payment_subscriptions(is_active, start_at, end_at) WHERE deleted_at IS NULL AND is_active = true
|
|
548
|
-
|
|
549
|
-
await tx`
|
|
338
|
+
`,await a`
|
|
550
339
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_coupons_subscription_id ON payment_subscriptions_coupons(subscription_id)
|
|
551
|
-
|
|
552
|
-
await tx`
|
|
340
|
+
`,await a`
|
|
553
341
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_coupons_coupon_id ON payment_subscriptions_coupons(coupon_id)
|
|
554
|
-
|
|
555
|
-
await tx`
|
|
342
|
+
`,await a`
|
|
556
343
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_plans_subscription_id ON payment_subscriptions_plans(subscription_id)
|
|
557
|
-
|
|
558
|
-
await tx`
|
|
344
|
+
`,await a`
|
|
559
345
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_plans_plan_id ON payment_subscriptions_plans(plan_id)
|
|
560
|
-
|
|
561
|
-
await tx`
|
|
346
|
+
`,await a`
|
|
562
347
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_credits_subscription_id ON payment_subscriptions_credits(subscription_id)
|
|
563
|
-
|
|
564
|
-
await tx`
|
|
348
|
+
`,await a`
|
|
565
349
|
CREATE INDEX IF NOT EXISTS idx_payment_subscriptions_credits_credit_id ON payment_subscriptions_credits(credit_id)
|
|
566
|
-
|
|
567
|
-
}
|
|
568
|
-
async down(tx) {
|
|
569
|
-
await tx`DROP TABLE IF EXISTS payment_subscriptions_credits CASCADE`;
|
|
570
|
-
await tx`DROP TABLE IF EXISTS payment_subscriptions_plans CASCADE`;
|
|
571
|
-
await tx`DROP TABLE IF EXISTS payment_subscriptions_coupons CASCADE`;
|
|
572
|
-
await tx`DROP TABLE IF EXISTS payment_subscriptions CASCADE`;
|
|
573
|
-
}
|
|
574
|
-
getVersion() {
|
|
575
|
-
return "20251225182218197";
|
|
576
|
-
}
|
|
577
|
-
getDependencies() {
|
|
578
|
-
return [
|
|
579
|
-
Migration20251225182218192,
|
|
580
|
-
Migration20251225182218190,
|
|
581
|
-
Migration20251225182218195
|
|
582
|
-
];
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
Migration20251225182218197 = __legacyDecorateClassTS([
|
|
586
|
-
decorator6.migration()
|
|
587
|
-
], Migration20251225182218197);
|
|
588
|
-
export {
|
|
589
|
-
Migration20251225182218197,
|
|
590
|
-
Migration20251225182218195,
|
|
591
|
-
Migration20251225182218192,
|
|
592
|
-
Migration20251225182218190,
|
|
593
|
-
Migration20251225182218188,
|
|
594
|
-
Migration20251225182218185
|
|
595
|
-
};
|
|
350
|
+
`}async down(a){await a`DROP TABLE IF EXISTS payment_subscriptions_credits CASCADE`,await a`DROP TABLE IF EXISTS payment_subscriptions_plans CASCADE`,await a`DROP TABLE IF EXISTS payment_subscriptions_coupons CASCADE`,await a`DROP TABLE IF EXISTS payment_subscriptions CASCADE`}getVersion(){return"20251225182218197"}getDependencies(){return[_,i,s]}}p=e([A.migration()],p);export{p as Migration20251225182218197,s as Migration20251225182218195,_ as Migration20251225182218192,i as Migration20251225182218190,t as Migration20251225182218188,E as Migration20251225182218185};
|
|
596
351
|
|
|
597
|
-
//# debugId=
|
|
352
|
+
//# debugId=17B4BC90CC4DD0FA64756E2164756E21
|