@ooneex/typeorm 0.13.0 → 0.15.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.
Files changed (141) hide show
  1. package/dist/shared/chunk-19qhst35.js +5 -0
  2. package/dist/shared/{chunk-tqd6ek7s.js.map → chunk-19qhst35.js.map} +2 -2
  3. package/dist/shared/{chunk-trhrh4e1.js → chunk-31y260d6.js} +24 -89
  4. package/dist/shared/{chunk-trhrh4e1.js.map → chunk-31y260d6.js.map} +2 -2
  5. package/dist/shared/chunk-59vwmfpm.js +5 -0
  6. package/dist/shared/{chunk-r9hsk9fk.js.map → chunk-59vwmfpm.js.map} +1 -1
  7. package/dist/shared/chunk-5tnqjb3n.js +5 -0
  8. package/dist/shared/{chunk-2wdazj26.js.map → chunk-5tnqjb3n.js.map} +2 -2
  9. package/dist/shared/chunk-5ybg5hda.js +5 -0
  10. package/dist/shared/{chunk-m4mpkr4n.js.map → chunk-5ybg5hda.js.map} +2 -2
  11. package/dist/shared/chunk-6jnj2pfx.js +5 -0
  12. package/dist/shared/{chunk-p12g6e7b.js.map → chunk-6jnj2pfx.js.map} +2 -2
  13. package/dist/shared/chunk-6kdkyjbn.js +5 -0
  14. package/dist/shared/{chunk-mssxq87m.js.map → chunk-6kdkyjbn.js.map} +2 -2
  15. package/dist/shared/{chunk-jap9t59k.js → chunk-aj0aak90.js} +14 -52
  16. package/dist/shared/{chunk-jap9t59k.js.map → chunk-aj0aak90.js.map} +2 -2
  17. package/dist/shared/chunk-e51ktjsq.js +5 -0
  18. package/dist/shared/{chunk-efmap3y3.js.map → chunk-e51ktjsq.js.map} +2 -2
  19. package/dist/shared/{chunk-yszvxhf3.js → chunk-jr0xys18.js} +11 -41
  20. package/dist/shared/{chunk-yszvxhf3.js.map → chunk-jr0xys18.js.map} +2 -2
  21. package/dist/shared/chunk-kw4t1san.js +5 -0
  22. package/dist/shared/{chunk-m9wkjs7v.js.map → chunk-kw4t1san.js.map} +2 -2
  23. package/dist/shared/chunk-nfv9ce7v.js +5 -0
  24. package/dist/shared/{chunk-qbn9p4vj.js.map → chunk-nfv9ce7v.js.map} +2 -2
  25. package/dist/shared/chunk-p22keb3y.js +5 -0
  26. package/dist/shared/{chunk-bkdccdhn.js.map → chunk-p22keb3y.js.map} +2 -2
  27. package/dist/shared/chunk-pbns711f.js +5 -0
  28. package/dist/shared/{chunk-hkfj9j6w.js.map → chunk-pbns711f.js.map} +2 -2
  29. package/dist/shared/{chunk-6vmvyg0q.js → chunk-qrs0g3m9.js} +17 -58
  30. package/dist/shared/{chunk-6vmvyg0q.js.map → chunk-qrs0g3m9.js.map} +2 -2
  31. package/dist/shared/{chunk-eets3mef.js → chunk-qyf32qsz.js} +22 -75
  32. package/dist/shared/{chunk-eets3mef.js.map → chunk-qyf32qsz.js.map} +2 -2
  33. package/dist/shared/chunk-t1jad451.js +5 -0
  34. package/dist/shared/{chunk-cv6xa6qy.js.map → chunk-t1jad451.js.map} +2 -2
  35. package/dist/shared/chunk-t5cy307m.js +5 -0
  36. package/dist/shared/{chunk-wg7xcq50.js.map → chunk-t5cy307m.js.map} +2 -2
  37. package/dist/shared/chunk-x2d798hg.js +5 -0
  38. package/dist/shared/{chunk-sk8z5zmk.js.map → chunk-x2d798hg.js.map} +2 -2
  39. package/dist/shared/chunk-x3pmm3na.js +5 -0
  40. package/dist/shared/{chunk-cwxhwya1.js.map → chunk-x3pmm3na.js.map} +2 -2
  41. package/dist/shared/chunk-xrqhqgen.js +5 -0
  42. package/dist/shared/{chunk-chan1evn.js.map → chunk-xrqhqgen.js.map} +2 -2
  43. package/dist/shared/chunk-xwe8m6av.js +5 -0
  44. package/dist/shared/{chunk-0swb1h0m.js.map → chunk-xwe8m6av.js.map} +2 -2
  45. package/dist/shared/chunk-yrwsqc6r.js +5 -0
  46. package/dist/shared/{chunk-6m3p1ht9.js.map → chunk-yrwsqc6r.js.map} +2 -2
  47. package/dist/src/entities/book/index.js +2 -34
  48. package/dist/src/entities/book/index.js.map +1 -1
  49. package/dist/src/entities/common/index.js +2 -26
  50. package/dist/src/entities/common/index.js.map +1 -1
  51. package/dist/src/entities/country/index.js +2 -9
  52. package/dist/src/entities/country/index.js.map +1 -1
  53. package/dist/src/entities/currency/index.js +2 -9
  54. package/dist/src/entities/currency/index.js.map +1 -1
  55. package/dist/src/entities/folder/index.js +2 -394
  56. package/dist/src/entities/folder/index.js.map +2 -2
  57. package/dist/src/entities/gamification/flashcard/index.js +2 -26
  58. package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
  59. package/dist/src/entities/gamification/index.js +2 -9
  60. package/dist/src/entities/gamification/index.js.map +1 -1
  61. package/dist/src/entities/gamification/mcq/index.js +2 -36
  62. package/dist/src/entities/gamification/mcq/index.js.map +1 -1
  63. package/dist/src/entities/image/index.js +2 -31
  64. package/dist/src/entities/image/index.js.map +1 -1
  65. package/dist/src/entities/medecine/index.js +2 -13
  66. package/dist/src/entities/medecine/index.js.map +1 -1
  67. package/dist/src/entities/payment/index.js +2 -23
  68. package/dist/src/entities/payment/index.js.map +1 -1
  69. package/dist/src/entities/user/index.js +2 -30
  70. package/dist/src/entities/user/index.js.map +1 -1
  71. package/dist/src/entities/video/index.js +2 -34
  72. package/dist/src/entities/video/index.js.map +1 -1
  73. package/dist/src/migrations/book/index.js +137 -541
  74. package/dist/src/migrations/book/index.js.map +2 -2
  75. package/dist/src/migrations/common/index.js +14 -63
  76. package/dist/src/migrations/common/index.js.map +2 -2
  77. package/dist/src/migrations/country/index.js +13 -48
  78. package/dist/src/migrations/country/index.js.map +2 -2
  79. package/dist/src/migrations/currency/index.js +14 -50
  80. package/dist/src/migrations/currency/index.js.map +2 -2
  81. package/dist/src/migrations/folder/index.js +104 -426
  82. package/dist/src/migrations/folder/index.js.map +2 -2
  83. package/dist/src/migrations/gamification/flashcard/index.js +96 -356
  84. package/dist/src/migrations/gamification/flashcard/index.js.map +2 -2
  85. package/dist/src/migrations/gamification/index.js +2 -8
  86. package/dist/src/migrations/gamification/index.js.map +1 -1
  87. package/dist/src/migrations/gamification/mcq/index.js +139 -553
  88. package/dist/src/migrations/gamification/mcq/index.js.map +2 -2
  89. package/dist/src/migrations/image/index.js +85 -353
  90. package/dist/src/migrations/image/index.js.map +2 -2
  91. package/dist/src/migrations/medecine/index.js +36 -132
  92. package/dist/src/migrations/medecine/index.js.map +2 -2
  93. package/dist/src/migrations/payment/index.js +94 -339
  94. package/dist/src/migrations/payment/index.js.map +2 -2
  95. package/dist/src/migrations/user/index.js +39 -331
  96. package/dist/src/migrations/user/index.js.map +2 -2
  97. package/dist/src/migrations/video/index.js +17 -345
  98. package/dist/src/migrations/video/index.js.map +2 -2
  99. package/dist/src/repositories/book/index.js +2 -997
  100. package/dist/src/repositories/book/index.js.map +2 -2
  101. package/dist/src/repositories/common/index.js +2 -439
  102. package/dist/src/repositories/common/index.js.map +2 -2
  103. package/dist/src/repositories/country/index.js +2 -89
  104. package/dist/src/repositories/country/index.js.map +2 -2
  105. package/dist/src/repositories/currency/index.js +2 -89
  106. package/dist/src/repositories/currency/index.js.map +2 -2
  107. package/dist/src/repositories/gamification/flashcard/index.js +2 -632
  108. package/dist/src/repositories/gamification/flashcard/index.js.map +2 -2
  109. package/dist/src/repositories/gamification/index.js +2 -160
  110. package/dist/src/repositories/gamification/index.js.map +2 -2
  111. package/dist/src/repositories/gamification/mcq/index.js +2 -1017
  112. package/dist/src/repositories/gamification/mcq/index.js.map +2 -2
  113. package/dist/src/repositories/image/index.js +2 -800
  114. package/dist/src/repositories/image/index.js.map +2 -2
  115. package/dist/src/repositories/medecine/index.js +2 -243
  116. package/dist/src/repositories/medecine/index.js.map +2 -2
  117. package/dist/src/repositories/payment/index.js +2 -560
  118. package/dist/src/repositories/payment/index.js.map +2 -2
  119. package/dist/src/repositories/user/index.js +2 -999
  120. package/dist/src/repositories/user/index.js.map +2 -2
  121. package/dist/src/repositories/video/index.js +2 -975
  122. package/dist/src/repositories/video/index.js.map +2 -2
  123. package/package.json +22 -21
  124. package/dist/shared/chunk-0swb1h0m.js +0 -51
  125. package/dist/shared/chunk-2wdazj26.js +0 -371
  126. package/dist/shared/chunk-6m3p1ht9.js +0 -606
  127. package/dist/shared/chunk-bkdccdhn.js +0 -105
  128. package/dist/shared/chunk-chan1evn.js +0 -72
  129. package/dist/shared/chunk-cv6xa6qy.js +0 -621
  130. package/dist/shared/chunk-cwxhwya1.js +0 -548
  131. package/dist/shared/chunk-efmap3y3.js +0 -345
  132. package/dist/shared/chunk-hkfj9j6w.js +0 -30
  133. package/dist/shared/chunk-m4mpkr4n.js +0 -34
  134. package/dist/shared/chunk-m9wkjs7v.js +0 -639
  135. package/dist/shared/chunk-mssxq87m.js +0 -195
  136. package/dist/shared/chunk-p12g6e7b.js +0 -38
  137. package/dist/shared/chunk-qbn9p4vj.js +0 -835
  138. package/dist/shared/chunk-r9hsk9fk.js +0 -20
  139. package/dist/shared/chunk-sk8z5zmk.js +0 -112
  140. package/dist/shared/chunk-tqd6ek7s.js +0 -86
  141. package/dist/shared/chunk-wg7xcq50.js +0 -38
@@ -1,17 +1,5 @@
1
1
  // @bun
2
- import {
3
- Migration20251225173348643,
4
- Migration20251225173350644
5
- } from "../../../shared/chunk-trhrh4e1.js";
6
- import {
7
- __legacyDecorateClassTS
8
- } from "../../../shared/chunk-r9hsk9fk.js";
9
-
10
- // src/migrations/folder/Migration20251225174626782.ts
11
- import { decorator } from "@ooneex/migrations";
12
- class Migration20251225174626782 {
13
- async up(tx) {
14
- await tx`
2
+ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from"../../../shared/chunk-59vwmfpm.js";import{decorator as J}from"@ooneex/migrations";class j{async up(h){await h`
15
3
  CREATE TABLE IF NOT EXISTS folders (
16
4
  id VARCHAR(25) PRIMARY KEY,
17
5
  name VARCHAR(255) NOT NULL,
@@ -33,64 +21,31 @@ class Migration20251225174626782 {
33
21
  CONSTRAINT fk_folders_color FOREIGN KEY (color_id) REFERENCES colors(id) ON DELETE SET NULL,
34
22
  CONSTRAINT fk_folders_parent FOREIGN KEY (parent_id) REFERENCES folders(id) ON DELETE CASCADE
35
23
  )
36
- `;
37
- await tx`
24
+ `,await h`
38
25
  CREATE INDEX IF NOT EXISTS idx_folders_name ON folders(name)
39
- `;
40
- await tx`
26
+ `,await h`
41
27
  CREATE INDEX IF NOT EXISTS idx_folders_color_id ON folders(color_id)
42
- `;
43
- await tx`
28
+ `,await h`
44
29
  CREATE INDEX IF NOT EXISTS idx_folders_parent_id ON folders(parent_id)
45
- `;
46
- await tx`
30
+ `,await h`
47
31
  CREATE INDEX IF NOT EXISTS idx_folders_context ON folders(context, context_id)
48
- `;
49
- await tx`
32
+ `,await h`
50
33
  CREATE INDEX IF NOT EXISTS idx_folders_language ON folders(language)
51
- `;
52
- await tx`
34
+ `,await h`
53
35
  CREATE INDEX IF NOT EXISTS idx_folders_deleted_at ON folders(deleted_at)
54
- `;
55
- await tx`
36
+ `,await h`
56
37
  CREATE INDEX IF NOT EXISTS idx_folders_is_public ON folders(is_public) WHERE deleted_at IS NULL
57
- `;
58
- await tx`
38
+ `,await h`
59
39
  CREATE INDEX IF NOT EXISTS idx_folders_name_lower ON folders(LOWER(name)) WHERE deleted_at IS NULL
60
- `;
61
- await tx`
40
+ `,await h`
62
41
  CREATE INDEX IF NOT EXISTS idx_folders_parent_name ON folders(parent_id, name) WHERE deleted_at IS NULL
63
- `;
64
- await tx`
42
+ `,await h`
65
43
  CREATE INDEX IF NOT EXISTS idx_folders_created_at ON folders(created_at DESC)
66
- `;
67
- await tx`
44
+ `,await h`
68
45
  CREATE INDEX IF NOT EXISTS idx_folders_updated_at ON folders(updated_at DESC)
69
- `;
70
- await tx`
46
+ `,await h`
71
47
  CREATE INDEX IF NOT EXISTS idx_folders_active ON folders(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
72
- `;
73
- }
74
- async down(tx) {
75
- await tx`DROP TABLE IF EXISTS folders CASCADE`;
76
- }
77
- getVersion() {
78
- return "20251225174626782";
79
- }
80
- getDependencies() {
81
- return [
82
- Migration20251225173348643
83
- ];
84
- }
85
- }
86
- Migration20251225174626782 = __legacyDecorateClassTS([
87
- decorator.migration()
88
- ], Migration20251225174626782);
89
- // src/migrations/folder/Migration20251225174627783.ts
90
- import { decorator as decorator2 } from "@ooneex/migrations";
91
- class Migration20251225174627783 {
92
- async up(tx) {
93
- await tx`
48
+ `}async down(h){await h`DROP TABLE IF EXISTS folders CASCADE`}getVersion(){return"20251225174626782"}getDependencies(){return[H]}}j=p([J.migration()],j);import{decorator as K}from"@ooneex/migrations";class q{async up(h){await h`
94
49
  CREATE TABLE IF NOT EXISTS folders_stats (
95
50
  id VARCHAR(25) PRIMARY KEY,
96
51
  folder_id VARCHAR(25),
@@ -114,58 +69,27 @@ class Migration20251225174627783 {
114
69
  deleted_at TIMESTAMPTZ,
115
70
  CONSTRAINT fk_folders_stats_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
116
71
  )
117
- `;
118
- await tx`
72
+ `,await h`
119
73
  CREATE INDEX IF NOT EXISTS idx_folders_stats_folder_id ON folders_stats(folder_id)
120
- `;
121
- await tx`
74
+ `,await h`
122
75
  CREATE INDEX IF NOT EXISTS idx_folders_stats_likes_count ON folders_stats(likes_count DESC)
123
- `;
124
- await tx`
76
+ `,await h`
125
77
  CREATE INDEX IF NOT EXISTS idx_folders_stats_views_count ON folders_stats(views_count DESC)
126
- `;
127
- await tx`
78
+ `,await h`
128
79
  CREATE INDEX IF NOT EXISTS idx_folders_stats_downloads_count ON folders_stats(downloads_count DESC)
129
- `;
130
- await tx`
80
+ `,await h`
131
81
  CREATE INDEX IF NOT EXISTS idx_folders_stats_language ON folders_stats(language)
132
- `;
133
- await tx`
82
+ `,await h`
134
83
  CREATE INDEX IF NOT EXISTS idx_folders_stats_deleted_at ON folders_stats(deleted_at)
135
- `;
136
- await tx`
84
+ `,await h`
137
85
  CREATE INDEX IF NOT EXISTS idx_folders_stats_is_public ON folders_stats(is_public) WHERE deleted_at IS NULL
138
- `;
139
- await tx`
86
+ `,await h`
140
87
  CREATE INDEX IF NOT EXISTS idx_folders_stats_popular ON folders_stats(is_public, likes_count DESC, views_count DESC) WHERE deleted_at IS NULL
141
- `;
142
- await tx`
88
+ `,await h`
143
89
  CREATE INDEX IF NOT EXISTS idx_folders_stats_created_at ON folders_stats(created_at DESC)
144
- `;
145
- await tx`
90
+ `,await h`
146
91
  CREATE INDEX IF NOT EXISTS idx_folders_stats_active ON folders_stats(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
147
- `;
148
- }
149
- async down(tx) {
150
- await tx`DROP TABLE IF EXISTS folders_stats CASCADE`;
151
- }
152
- getVersion() {
153
- return "20251225174627783";
154
- }
155
- getDependencies() {
156
- return [
157
- Migration20251225174626782
158
- ];
159
- }
160
- }
161
- Migration20251225174627783 = __legacyDecorateClassTS([
162
- decorator2.migration()
163
- ], Migration20251225174627783);
164
- // src/migrations/folder/Migration20251225174628784.ts
165
- import { decorator as decorator3 } from "@ooneex/migrations";
166
- class Migration20251225174628784 {
167
- async up(tx) {
168
- await tx`
92
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_stats CASCADE`}getVersion(){return"20251225174627783"}getDependencies(){return[j]}}q=p([K.migration()],q);import{decorator as L}from"@ooneex/migrations";class v{async up(h){await h`
169
93
  CREATE TABLE IF NOT EXISTS folders_comments (
170
94
  id VARCHAR(25) PRIMARY KEY,
171
95
  folder_id VARCHAR(25),
@@ -186,55 +110,25 @@ class Migration20251225174628784 {
186
110
  CONSTRAINT fk_folders_comments_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE,
187
111
  CONSTRAINT fk_folders_comments_parent FOREIGN KEY (parent_comment_id) REFERENCES folders_comments(id) ON DELETE CASCADE
188
112
  )
189
- `;
190
- await tx`
113
+ `,await h`
191
114
  CREATE INDEX IF NOT EXISTS idx_folders_comments_folder_id ON folders_comments(folder_id)
192
- `;
193
- await tx`
115
+ `,await h`
194
116
  CREATE INDEX IF NOT EXISTS idx_folders_comments_commented_by_id ON folders_comments(commented_by_id)
195
- `;
196
- await tx`
117
+ `,await h`
197
118
  CREATE INDEX IF NOT EXISTS idx_folders_comments_parent_comment_id ON folders_comments(parent_comment_id)
198
- `;
199
- await tx`
119
+ `,await h`
200
120
  CREATE INDEX IF NOT EXISTS idx_folders_comments_language ON folders_comments(language)
201
- `;
202
- await tx`
121
+ `,await h`
203
122
  CREATE INDEX IF NOT EXISTS idx_folders_comments_deleted_at ON folders_comments(deleted_at)
204
- `;
205
- await tx`
123
+ `,await h`
206
124
  CREATE INDEX IF NOT EXISTS idx_folders_comments_is_public ON folders_comments(is_public) WHERE deleted_at IS NULL
207
- `;
208
- await tx`
125
+ `,await h`
209
126
  CREATE INDEX IF NOT EXISTS idx_folders_comments_created_at ON folders_comments(created_at DESC)
210
- `;
211
- await tx`
127
+ `,await h`
212
128
  CREATE INDEX IF NOT EXISTS idx_folders_comments_folder_created ON folders_comments(folder_id, created_at DESC) WHERE deleted_at IS NULL
213
- `;
214
- await tx`
129
+ `,await h`
215
130
  CREATE INDEX IF NOT EXISTS idx_folders_comments_active ON folders_comments(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
216
- `;
217
- }
218
- async down(tx) {
219
- await tx`DROP TABLE IF EXISTS folders_comments CASCADE`;
220
- }
221
- getVersion() {
222
- return "20251225174628784";
223
- }
224
- getDependencies() {
225
- return [
226
- Migration20251225174626782
227
- ];
228
- }
229
- }
230
- Migration20251225174628784 = __legacyDecorateClassTS([
231
- decorator3.migration()
232
- ], Migration20251225174628784);
233
- // src/migrations/folder/Migration20251225174629784.ts
234
- import { decorator as decorator4 } from "@ooneex/migrations";
235
- class Migration20251225174629784 {
236
- async up(tx) {
237
- await tx`
131
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_comments CASCADE`}getVersion(){return"20251225174628784"}getDependencies(){return[j]}}v=p([L.migration()],v);import{decorator as N}from"@ooneex/migrations";class z{async up(h){await h`
238
132
  CREATE TABLE IF NOT EXISTS folders_liked (
239
133
  id VARCHAR(25) PRIMARY KEY,
240
134
  folder_id VARCHAR(25),
@@ -252,52 +146,23 @@ class Migration20251225174629784 {
252
146
  deleted_at TIMESTAMPTZ,
253
147
  CONSTRAINT fk_folders_liked_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
254
148
  )
255
- `;
256
- await tx`
149
+ `,await h`
257
150
  CREATE INDEX IF NOT EXISTS idx_folders_liked_folder_id ON folders_liked(folder_id)
258
- `;
259
- await tx`
151
+ `,await h`
260
152
  CREATE INDEX IF NOT EXISTS idx_folders_liked_liked_by_id ON folders_liked(liked_by_id)
261
- `;
262
- await tx`
153
+ `,await h`
263
154
  CREATE INDEX IF NOT EXISTS idx_folders_liked_language ON folders_liked(language)
264
- `;
265
- await tx`
155
+ `,await h`
266
156
  CREATE INDEX IF NOT EXISTS idx_folders_liked_deleted_at ON folders_liked(deleted_at)
267
- `;
268
- await tx`
157
+ `,await h`
269
158
  CREATE INDEX IF NOT EXISTS idx_folders_liked_is_public ON folders_liked(is_public) WHERE deleted_at IS NULL
270
- `;
271
- await tx`
159
+ `,await h`
272
160
  CREATE INDEX IF NOT EXISTS idx_folders_liked_created_at ON folders_liked(created_at DESC)
273
- `;
274
- await tx`
161
+ `,await h`
275
162
  CREATE INDEX IF NOT EXISTS idx_folders_liked_folder_user ON folders_liked(folder_id, liked_by_id) WHERE deleted_at IS NULL
276
- `;
277
- await tx`
163
+ `,await h`
278
164
  CREATE INDEX IF NOT EXISTS idx_folders_liked_active ON folders_liked(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
279
- `;
280
- }
281
- async down(tx) {
282
- await tx`DROP TABLE IF EXISTS folders_liked CASCADE`;
283
- }
284
- getVersion() {
285
- return "20251225174629784";
286
- }
287
- getDependencies() {
288
- return [
289
- Migration20251225174626782
290
- ];
291
- }
292
- }
293
- Migration20251225174629784 = __legacyDecorateClassTS([
294
- decorator4.migration()
295
- ], Migration20251225174629784);
296
- // src/migrations/folder/Migration20251225174630785.ts
297
- import { decorator as decorator5 } from "@ooneex/migrations";
298
- class Migration20251225174630785 {
299
- async up(tx) {
300
- await tx`
165
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_liked CASCADE`}getVersion(){return"20251225174629784"}getDependencies(){return[j]}}z=p([N.migration()],z);import{decorator as O}from"@ooneex/migrations";class A{async up(h){await h`
301
166
  CREATE TABLE IF NOT EXISTS folders_disliked (
302
167
  id VARCHAR(25) PRIMARY KEY,
303
168
  folder_id VARCHAR(25),
@@ -315,52 +180,23 @@ class Migration20251225174630785 {
315
180
  deleted_at TIMESTAMPTZ,
316
181
  CONSTRAINT fk_folders_disliked_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
317
182
  )
318
- `;
319
- await tx`
183
+ `,await h`
320
184
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_folder_id ON folders_disliked(folder_id)
321
- `;
322
- await tx`
185
+ `,await h`
323
186
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_disliked_by_id ON folders_disliked(disliked_by_id)
324
- `;
325
- await tx`
187
+ `,await h`
326
188
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_language ON folders_disliked(language)
327
- `;
328
- await tx`
189
+ `,await h`
329
190
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_deleted_at ON folders_disliked(deleted_at)
330
- `;
331
- await tx`
191
+ `,await h`
332
192
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_is_public ON folders_disliked(is_public) WHERE deleted_at IS NULL
333
- `;
334
- await tx`
193
+ `,await h`
335
194
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_created_at ON folders_disliked(created_at DESC)
336
- `;
337
- await tx`
195
+ `,await h`
338
196
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_folder_user ON folders_disliked(folder_id, disliked_by_id) WHERE deleted_at IS NULL
339
- `;
340
- await tx`
197
+ `,await h`
341
198
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_active ON folders_disliked(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
342
- `;
343
- }
344
- async down(tx) {
345
- await tx`DROP TABLE IF EXISTS folders_disliked CASCADE`;
346
- }
347
- getVersion() {
348
- return "20251225174630785";
349
- }
350
- getDependencies() {
351
- return [
352
- Migration20251225174626782
353
- ];
354
- }
355
- }
356
- Migration20251225174630785 = __legacyDecorateClassTS([
357
- decorator5.migration()
358
- ], Migration20251225174630785);
359
- // src/migrations/folder/Migration20251225174631785.ts
360
- import { decorator as decorator6 } from "@ooneex/migrations";
361
- class Migration20251225174631785 {
362
- async up(tx) {
363
- await tx`
199
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_disliked CASCADE`}getVersion(){return"20251225174630785"}getDependencies(){return[j]}}A=p([O.migration()],A);import{decorator as P}from"@ooneex/migrations";class B{async up(h){await h`
364
200
  CREATE TABLE IF NOT EXISTS folders_viewed (
365
201
  id VARCHAR(25) PRIMARY KEY,
366
202
  folder_id VARCHAR(25),
@@ -378,52 +214,23 @@ class Migration20251225174631785 {
378
214
  deleted_at TIMESTAMPTZ,
379
215
  CONSTRAINT fk_folders_viewed_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
380
216
  )
381
- `;
382
- await tx`
217
+ `,await h`
383
218
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_folder_id ON folders_viewed(folder_id)
384
- `;
385
- await tx`
219
+ `,await h`
386
220
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_viewed_by_id ON folders_viewed(viewed_by_id)
387
- `;
388
- await tx`
221
+ `,await h`
389
222
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_language ON folders_viewed(language)
390
- `;
391
- await tx`
223
+ `,await h`
392
224
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_deleted_at ON folders_viewed(deleted_at)
393
- `;
394
- await tx`
225
+ `,await h`
395
226
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_is_public ON folders_viewed(is_public) WHERE deleted_at IS NULL
396
- `;
397
- await tx`
227
+ `,await h`
398
228
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_created_at ON folders_viewed(created_at DESC)
399
- `;
400
- await tx`
229
+ `,await h`
401
230
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_folder_user ON folders_viewed(folder_id, viewed_by_id) WHERE deleted_at IS NULL
402
- `;
403
- await tx`
231
+ `,await h`
404
232
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_active ON folders_viewed(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
405
- `;
406
- }
407
- async down(tx) {
408
- await tx`DROP TABLE IF EXISTS folders_viewed CASCADE`;
409
- }
410
- getVersion() {
411
- return "20251225174631785";
412
- }
413
- getDependencies() {
414
- return [
415
- Migration20251225174626782
416
- ];
417
- }
418
- }
419
- Migration20251225174631785 = __legacyDecorateClassTS([
420
- decorator6.migration()
421
- ], Migration20251225174631785);
422
- // src/migrations/folder/Migration20251225174632786.ts
423
- import { decorator as decorator7 } from "@ooneex/migrations";
424
- class Migration20251225174632786 {
425
- async up(tx) {
426
- await tx`
233
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_viewed CASCADE`}getVersion(){return"20251225174631785"}getDependencies(){return[j]}}B=p([P.migration()],B);import{decorator as Q}from"@ooneex/migrations";class C{async up(h){await h`
427
234
  CREATE TABLE IF NOT EXISTS folders_saved (
428
235
  id VARCHAR(25) PRIMARY KEY,
429
236
  folder_id VARCHAR(25),
@@ -441,52 +248,23 @@ class Migration20251225174632786 {
441
248
  deleted_at TIMESTAMPTZ,
442
249
  CONSTRAINT fk_folders_saved_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
443
250
  )
444
- `;
445
- await tx`
251
+ `,await h`
446
252
  CREATE INDEX IF NOT EXISTS idx_folders_saved_folder_id ON folders_saved(folder_id)
447
- `;
448
- await tx`
253
+ `,await h`
449
254
  CREATE INDEX IF NOT EXISTS idx_folders_saved_saved_by_id ON folders_saved(saved_by_id)
450
- `;
451
- await tx`
255
+ `,await h`
452
256
  CREATE INDEX IF NOT EXISTS idx_folders_saved_language ON folders_saved(language)
453
- `;
454
- await tx`
257
+ `,await h`
455
258
  CREATE INDEX IF NOT EXISTS idx_folders_saved_deleted_at ON folders_saved(deleted_at)
456
- `;
457
- await tx`
259
+ `,await h`
458
260
  CREATE INDEX IF NOT EXISTS idx_folders_saved_is_public ON folders_saved(is_public) WHERE deleted_at IS NULL
459
- `;
460
- await tx`
261
+ `,await h`
461
262
  CREATE INDEX IF NOT EXISTS idx_folders_saved_created_at ON folders_saved(created_at DESC)
462
- `;
463
- await tx`
263
+ `,await h`
464
264
  CREATE INDEX IF NOT EXISTS idx_folders_saved_folder_user ON folders_saved(folder_id, saved_by_id) WHERE deleted_at IS NULL
465
- `;
466
- await tx`
265
+ `,await h`
467
266
  CREATE INDEX IF NOT EXISTS idx_folders_saved_active ON folders_saved(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
468
- `;
469
- }
470
- async down(tx) {
471
- await tx`DROP TABLE IF EXISTS folders_saved CASCADE`;
472
- }
473
- getVersion() {
474
- return "20251225174632786";
475
- }
476
- getDependencies() {
477
- return [
478
- Migration20251225174626782
479
- ];
480
- }
481
- }
482
- Migration20251225174632786 = __legacyDecorateClassTS([
483
- decorator7.migration()
484
- ], Migration20251225174632786);
485
- // src/migrations/folder/Migration20251225174633787.ts
486
- import { decorator as decorator8 } from "@ooneex/migrations";
487
- class Migration20251225174633787 {
488
- async up(tx) {
489
- await tx`
267
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_saved CASCADE`}getVersion(){return"20251225174632786"}getDependencies(){return[j]}}C=p([Q.migration()],C);import{decorator as R}from"@ooneex/migrations";class D{async up(h){await h`
490
268
  CREATE TABLE IF NOT EXISTS folders_downloaded (
491
269
  id VARCHAR(25) PRIMARY KEY,
492
270
  folder_id VARCHAR(25),
@@ -504,52 +282,23 @@ class Migration20251225174633787 {
504
282
  deleted_at TIMESTAMPTZ,
505
283
  CONSTRAINT fk_folders_downloaded_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
506
284
  )
507
- `;
508
- await tx`
285
+ `,await h`
509
286
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_folder_id ON folders_downloaded(folder_id)
510
- `;
511
- await tx`
287
+ `,await h`
512
288
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_downloaded_by_id ON folders_downloaded(downloaded_by_id)
513
- `;
514
- await tx`
289
+ `,await h`
515
290
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_language ON folders_downloaded(language)
516
- `;
517
- await tx`
291
+ `,await h`
518
292
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_deleted_at ON folders_downloaded(deleted_at)
519
- `;
520
- await tx`
293
+ `,await h`
521
294
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_is_public ON folders_downloaded(is_public) WHERE deleted_at IS NULL
522
- `;
523
- await tx`
295
+ `,await h`
524
296
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_created_at ON folders_downloaded(created_at DESC)
525
- `;
526
- await tx`
297
+ `,await h`
527
298
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_folder_user ON folders_downloaded(folder_id, downloaded_by_id) WHERE deleted_at IS NULL
528
- `;
529
- await tx`
299
+ `,await h`
530
300
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_active ON folders_downloaded(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
531
- `;
532
- }
533
- async down(tx) {
534
- await tx`DROP TABLE IF EXISTS folders_downloaded CASCADE`;
535
- }
536
- getVersion() {
537
- return "20251225174633787";
538
- }
539
- getDependencies() {
540
- return [
541
- Migration20251225174626782
542
- ];
543
- }
544
- }
545
- Migration20251225174633787 = __legacyDecorateClassTS([
546
- decorator8.migration()
547
- ], Migration20251225174633787);
548
- // src/migrations/folder/Migration20251225174634788.ts
549
- import { decorator as decorator9 } from "@ooneex/migrations";
550
- class Migration20251225174634788 {
551
- async up(tx) {
552
- await tx`
301
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_downloaded CASCADE`}getVersion(){return"20251225174633787"}getDependencies(){return[j]}}D=p([R.migration()],D);import{decorator as S}from"@ooneex/migrations";class E{async up(h){await h`
553
302
  CREATE TABLE IF NOT EXISTS folders_shared (
554
303
  id VARCHAR(25) PRIMARY KEY,
555
304
  folder_id VARCHAR(25),
@@ -569,61 +318,29 @@ class Migration20251225174634788 {
569
318
  deleted_at TIMESTAMPTZ,
570
319
  CONSTRAINT fk_folders_shared_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
571
320
  )
572
- `;
573
- await tx`
321
+ `,await h`
574
322
  CREATE INDEX IF NOT EXISTS idx_folders_shared_folder_id ON folders_shared(folder_id)
575
- `;
576
- await tx`
323
+ `,await h`
577
324
  CREATE INDEX IF NOT EXISTS idx_folders_shared_shared_by_id ON folders_shared(shared_by_id)
578
- `;
579
- await tx`
325
+ `,await h`
580
326
  CREATE INDEX IF NOT EXISTS idx_folders_shared_permission ON folders_shared(permission)
581
- `;
582
- await tx`
327
+ `,await h`
583
328
  CREATE INDEX IF NOT EXISTS idx_folders_shared_expires_at ON folders_shared(expires_at)
584
- `;
585
- await tx`
329
+ `,await h`
586
330
  CREATE INDEX IF NOT EXISTS idx_folders_shared_language ON folders_shared(language)
587
- `;
588
- await tx`
331
+ `,await h`
589
332
  CREATE INDEX IF NOT EXISTS idx_folders_shared_deleted_at ON folders_shared(deleted_at)
590
- `;
591
- await tx`
333
+ `,await h`
592
334
  CREATE INDEX IF NOT EXISTS idx_folders_shared_is_public ON folders_shared(is_public) WHERE deleted_at IS NULL
593
- `;
594
- await tx`
335
+ `,await h`
595
336
  CREATE INDEX IF NOT EXISTS idx_folders_shared_created_at ON folders_shared(created_at DESC)
596
- `;
597
- await tx`
337
+ `,await h`
598
338
  CREATE INDEX IF NOT EXISTS idx_folders_shared_folder_user ON folders_shared(folder_id, shared_by_id) WHERE deleted_at IS NULL
599
- `;
600
- await tx`
339
+ `,await h`
601
340
  CREATE INDEX IF NOT EXISTS idx_folders_shared_active ON folders_shared(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
602
- `;
603
- await tx`
341
+ `,await h`
604
342
  CREATE INDEX IF NOT EXISTS idx_folders_shared_active_not_expired ON folders_shared(expires_at) WHERE deleted_at IS NULL AND expires_at > NOW()
605
- `;
606
- }
607
- async down(tx) {
608
- await tx`DROP TABLE IF EXISTS folders_shared CASCADE`;
609
- }
610
- getVersion() {
611
- return "20251225174634788";
612
- }
613
- getDependencies() {
614
- return [
615
- Migration20251225174626782
616
- ];
617
- }
618
- }
619
- Migration20251225174634788 = __legacyDecorateClassTS([
620
- decorator9.migration()
621
- ], Migration20251225174634788);
622
- // src/migrations/folder/Migration20251225174635789.ts
623
- import { decorator as decorator10 } from "@ooneex/migrations";
624
- class Migration20251225174635789 {
625
- async up(tx) {
626
- await tx`
343
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_shared CASCADE`}getVersion(){return"20251225174634788"}getDependencies(){return[j]}}E=p([S.migration()],E);import{decorator as T}from"@ooneex/migrations";class G{async up(h){await h`
627
344
  CREATE TABLE IF NOT EXISTS folders_reports (
628
345
  id VARCHAR(25) PRIMARY KEY,
629
346
  folder_id VARCHAR(25),
@@ -645,65 +362,26 @@ class Migration20251225174635789 {
645
362
  CONSTRAINT fk_folders_reports_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE,
646
363
  CONSTRAINT fk_folders_reports_status FOREIGN KEY (status_id) REFERENCES statuses(id) ON DELETE SET NULL
647
364
  )
648
- `;
649
- await tx`
365
+ `,await h`
650
366
  CREATE INDEX IF NOT EXISTS idx_folders_reports_folder_id ON folders_reports(folder_id)
651
- `;
652
- await tx`
367
+ `,await h`
653
368
  CREATE INDEX IF NOT EXISTS idx_folders_reports_reported_by_id ON folders_reports(reported_by_id)
654
- `;
655
- await tx`
369
+ `,await h`
656
370
  CREATE INDEX IF NOT EXISTS idx_folders_reports_status_id ON folders_reports(status_id)
657
- `;
658
- await tx`
371
+ `,await h`
659
372
  CREATE INDEX IF NOT EXISTS idx_folders_reports_reason ON folders_reports(reason)
660
- `;
661
- await tx`
373
+ `,await h`
662
374
  CREATE INDEX IF NOT EXISTS idx_folders_reports_language ON folders_reports(language)
663
- `;
664
- await tx`
375
+ `,await h`
665
376
  CREATE INDEX IF NOT EXISTS idx_folders_reports_deleted_at ON folders_reports(deleted_at)
666
- `;
667
- await tx`
377
+ `,await h`
668
378
  CREATE INDEX IF NOT EXISTS idx_folders_reports_is_public ON folders_reports(is_public) WHERE deleted_at IS NULL
669
- `;
670
- await tx`
379
+ `,await h`
671
380
  CREATE INDEX IF NOT EXISTS idx_folders_reports_created_at ON folders_reports(created_at DESC)
672
- `;
673
- await tx`
381
+ `,await h`
674
382
  CREATE INDEX IF NOT EXISTS idx_folders_reports_folder_status ON folders_reports(folder_id, status_id) WHERE deleted_at IS NULL
675
- `;
676
- await tx`
383
+ `,await h`
677
384
  CREATE INDEX IF NOT EXISTS idx_folders_reports_active ON folders_reports(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
678
- `;
679
- }
680
- async down(tx) {
681
- await tx`DROP TABLE IF EXISTS folders_reports CASCADE`;
682
- }
683
- getVersion() {
684
- return "20251225174635789";
685
- }
686
- getDependencies() {
687
- return [
688
- Migration20251225174626782,
689
- Migration20251225173350644
690
- ];
691
- }
692
- }
693
- Migration20251225174635789 = __legacyDecorateClassTS([
694
- decorator10.migration()
695
- ], Migration20251225174635789);
696
- export {
697
- Migration20251225174635789,
698
- Migration20251225174634788,
699
- Migration20251225174633787,
700
- Migration20251225174632786,
701
- Migration20251225174631785,
702
- Migration20251225174630785,
703
- Migration20251225174629784,
704
- Migration20251225174628784,
705
- Migration20251225174627783,
706
- Migration20251225174626782
707
- };
385
+ `}async down(h){await h`DROP TABLE IF EXISTS folders_reports CASCADE`}getVersion(){return"20251225174635789"}getDependencies(){return[j,I]}}G=p([T.migration()],G);export{G as Migration20251225174635789,E as Migration20251225174634788,D as Migration20251225174633787,C as Migration20251225174632786,B as Migration20251225174631785,A as Migration20251225174630785,z as Migration20251225174629784,v as Migration20251225174628784,q as Migration20251225174627783,j as Migration20251225174626782};
708
386
 
709
- //# debugId=6DDDB58BDDF7223C64756E2164756E21
387
+ //# debugId=2834BF9E9B20B0A364756E2164756E21