@ooneex/typeorm 0.11.0 → 0.12.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-0swb1h0m.js +51 -0
  2. package/dist/shared/{chunk-xwe8m6av.js.map → chunk-0swb1h0m.js.map} +2 -2
  3. package/dist/shared/chunk-2wdazj26.js +371 -0
  4. package/dist/shared/{chunk-5tnqjb3n.js.map → chunk-2wdazj26.js.map} +2 -2
  5. package/dist/shared/chunk-6m3p1ht9.js +606 -0
  6. package/dist/shared/{chunk-yrwsqc6r.js.map → chunk-6m3p1ht9.js.map} +2 -2
  7. package/dist/shared/{chunk-qrs0g3m9.js → chunk-6vmvyg0q.js} +58 -17
  8. package/dist/shared/{chunk-qrs0g3m9.js.map → chunk-6vmvyg0q.js.map} +2 -2
  9. package/dist/shared/chunk-bkdccdhn.js +105 -0
  10. package/dist/shared/{chunk-p22keb3y.js.map → chunk-bkdccdhn.js.map} +2 -2
  11. package/dist/shared/chunk-chan1evn.js +72 -0
  12. package/dist/shared/{chunk-xrqhqgen.js.map → chunk-chan1evn.js.map} +2 -2
  13. package/dist/shared/chunk-cv6xa6qy.js +621 -0
  14. package/dist/shared/{chunk-t1jad451.js.map → chunk-cv6xa6qy.js.map} +2 -2
  15. package/dist/shared/chunk-cwxhwya1.js +548 -0
  16. package/dist/shared/{chunk-x3pmm3na.js.map → chunk-cwxhwya1.js.map} +2 -2
  17. package/dist/shared/{chunk-qyf32qsz.js → chunk-eets3mef.js} +75 -22
  18. package/dist/shared/{chunk-qyf32qsz.js.map → chunk-eets3mef.js.map} +2 -2
  19. package/dist/shared/chunk-efmap3y3.js +345 -0
  20. package/dist/shared/{chunk-e51ktjsq.js.map → chunk-efmap3y3.js.map} +2 -2
  21. package/dist/shared/chunk-hkfj9j6w.js +30 -0
  22. package/dist/shared/{chunk-pbns711f.js.map → chunk-hkfj9j6w.js.map} +2 -2
  23. package/dist/shared/{chunk-aj0aak90.js → chunk-jap9t59k.js} +52 -14
  24. package/dist/shared/{chunk-aj0aak90.js.map → chunk-jap9t59k.js.map} +2 -2
  25. package/dist/shared/chunk-m4mpkr4n.js +34 -0
  26. package/dist/shared/{chunk-5ybg5hda.js.map → chunk-m4mpkr4n.js.map} +2 -2
  27. package/dist/shared/chunk-m9wkjs7v.js +639 -0
  28. package/dist/shared/{chunk-kw4t1san.js.map → chunk-m9wkjs7v.js.map} +2 -2
  29. package/dist/shared/chunk-mssxq87m.js +195 -0
  30. package/dist/shared/{chunk-6kdkyjbn.js.map → chunk-mssxq87m.js.map} +2 -2
  31. package/dist/shared/chunk-p12g6e7b.js +38 -0
  32. package/dist/shared/{chunk-6jnj2pfx.js.map → chunk-p12g6e7b.js.map} +2 -2
  33. package/dist/shared/chunk-qbn9p4vj.js +835 -0
  34. package/dist/shared/{chunk-nfv9ce7v.js.map → chunk-qbn9p4vj.js.map} +2 -2
  35. package/dist/shared/chunk-r9hsk9fk.js +20 -0
  36. package/dist/shared/{chunk-59vwmfpm.js.map → chunk-r9hsk9fk.js.map} +1 -1
  37. package/dist/shared/chunk-sk8z5zmk.js +112 -0
  38. package/dist/shared/{chunk-x2d798hg.js.map → chunk-sk8z5zmk.js.map} +2 -2
  39. package/dist/shared/chunk-tqd6ek7s.js +86 -0
  40. package/dist/shared/{chunk-19qhst35.js.map → chunk-tqd6ek7s.js.map} +2 -2
  41. package/dist/shared/{chunk-31y260d6.js → chunk-trhrh4e1.js} +89 -24
  42. package/dist/shared/{chunk-31y260d6.js.map → chunk-trhrh4e1.js.map} +2 -2
  43. package/dist/shared/chunk-wg7xcq50.js +38 -0
  44. package/dist/shared/{chunk-t5cy307m.js.map → chunk-wg7xcq50.js.map} +2 -2
  45. package/dist/shared/{chunk-jr0xys18.js → chunk-yszvxhf3.js} +41 -11
  46. package/dist/shared/{chunk-jr0xys18.js.map → chunk-yszvxhf3.js.map} +2 -2
  47. package/dist/src/entities/book/index.js +34 -2
  48. package/dist/src/entities/book/index.js.map +1 -1
  49. package/dist/src/entities/common/index.js +26 -2
  50. package/dist/src/entities/common/index.js.map +1 -1
  51. package/dist/src/entities/country/index.js +9 -2
  52. package/dist/src/entities/country/index.js.map +1 -1
  53. package/dist/src/entities/currency/index.js +9 -2
  54. package/dist/src/entities/currency/index.js.map +1 -1
  55. package/dist/src/entities/folder/index.js +394 -2
  56. package/dist/src/entities/folder/index.js.map +2 -2
  57. package/dist/src/entities/gamification/flashcard/index.js +26 -2
  58. package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
  59. package/dist/src/entities/gamification/index.js +9 -2
  60. package/dist/src/entities/gamification/index.js.map +1 -1
  61. package/dist/src/entities/gamification/mcq/index.js +36 -2
  62. package/dist/src/entities/gamification/mcq/index.js.map +1 -1
  63. package/dist/src/entities/image/index.js +31 -2
  64. package/dist/src/entities/image/index.js.map +1 -1
  65. package/dist/src/entities/medecine/index.js +13 -2
  66. package/dist/src/entities/medecine/index.js.map +1 -1
  67. package/dist/src/entities/payment/index.js +23 -2
  68. package/dist/src/entities/payment/index.js.map +1 -1
  69. package/dist/src/entities/user/index.js +30 -2
  70. package/dist/src/entities/user/index.js.map +1 -1
  71. package/dist/src/entities/video/index.js +34 -2
  72. package/dist/src/entities/video/index.js.map +1 -1
  73. package/dist/src/migrations/book/index.js +541 -137
  74. package/dist/src/migrations/book/index.js.map +2 -2
  75. package/dist/src/migrations/common/index.js +63 -14
  76. package/dist/src/migrations/common/index.js.map +2 -2
  77. package/dist/src/migrations/country/index.js +48 -13
  78. package/dist/src/migrations/country/index.js.map +2 -2
  79. package/dist/src/migrations/currency/index.js +50 -14
  80. package/dist/src/migrations/currency/index.js.map +2 -2
  81. package/dist/src/migrations/folder/index.js +426 -104
  82. package/dist/src/migrations/folder/index.js.map +2 -2
  83. package/dist/src/migrations/gamification/flashcard/index.js +356 -96
  84. package/dist/src/migrations/gamification/flashcard/index.js.map +2 -2
  85. package/dist/src/migrations/gamification/index.js +8 -2
  86. package/dist/src/migrations/gamification/index.js.map +1 -1
  87. package/dist/src/migrations/gamification/mcq/index.js +553 -139
  88. package/dist/src/migrations/gamification/mcq/index.js.map +2 -2
  89. package/dist/src/migrations/image/index.js +353 -85
  90. package/dist/src/migrations/image/index.js.map +2 -2
  91. package/dist/src/migrations/medecine/index.js +132 -36
  92. package/dist/src/migrations/medecine/index.js.map +2 -2
  93. package/dist/src/migrations/payment/index.js +339 -94
  94. package/dist/src/migrations/payment/index.js.map +2 -2
  95. package/dist/src/migrations/user/index.js +331 -39
  96. package/dist/src/migrations/user/index.js.map +2 -2
  97. package/dist/src/migrations/video/index.js +345 -17
  98. package/dist/src/migrations/video/index.js.map +2 -2
  99. package/dist/src/repositories/book/index.js +997 -2
  100. package/dist/src/repositories/book/index.js.map +2 -2
  101. package/dist/src/repositories/common/index.js +439 -2
  102. package/dist/src/repositories/common/index.js.map +2 -2
  103. package/dist/src/repositories/country/index.js +89 -2
  104. package/dist/src/repositories/country/index.js.map +2 -2
  105. package/dist/src/repositories/currency/index.js +89 -2
  106. package/dist/src/repositories/currency/index.js.map +2 -2
  107. package/dist/src/repositories/gamification/flashcard/index.js +632 -2
  108. package/dist/src/repositories/gamification/flashcard/index.js.map +2 -2
  109. package/dist/src/repositories/gamification/index.js +160 -2
  110. package/dist/src/repositories/gamification/index.js.map +2 -2
  111. package/dist/src/repositories/gamification/mcq/index.js +1017 -2
  112. package/dist/src/repositories/gamification/mcq/index.js.map +2 -2
  113. package/dist/src/repositories/image/index.js +800 -2
  114. package/dist/src/repositories/image/index.js.map +2 -2
  115. package/dist/src/repositories/medecine/index.js +243 -2
  116. package/dist/src/repositories/medecine/index.js.map +2 -2
  117. package/dist/src/repositories/payment/index.js +560 -2
  118. package/dist/src/repositories/payment/index.js.map +2 -2
  119. package/dist/src/repositories/user/index.js +999 -2
  120. package/dist/src/repositories/user/index.js.map +2 -2
  121. package/dist/src/repositories/video/index.js +975 -2
  122. package/dist/src/repositories/video/index.js.map +2 -2
  123. package/package.json +1 -1
  124. package/dist/shared/chunk-19qhst35.js +0 -5
  125. package/dist/shared/chunk-59vwmfpm.js +0 -5
  126. package/dist/shared/chunk-5tnqjb3n.js +0 -5
  127. package/dist/shared/chunk-5ybg5hda.js +0 -5
  128. package/dist/shared/chunk-6jnj2pfx.js +0 -5
  129. package/dist/shared/chunk-6kdkyjbn.js +0 -5
  130. package/dist/shared/chunk-e51ktjsq.js +0 -5
  131. package/dist/shared/chunk-kw4t1san.js +0 -5
  132. package/dist/shared/chunk-nfv9ce7v.js +0 -5
  133. package/dist/shared/chunk-p22keb3y.js +0 -5
  134. package/dist/shared/chunk-pbns711f.js +0 -5
  135. package/dist/shared/chunk-t1jad451.js +0 -5
  136. package/dist/shared/chunk-t5cy307m.js +0 -5
  137. package/dist/shared/chunk-x2d798hg.js +0 -5
  138. package/dist/shared/chunk-x3pmm3na.js +0 -5
  139. package/dist/shared/chunk-xrqhqgen.js +0 -5
  140. package/dist/shared/chunk-xwe8m6av.js +0 -5
  141. package/dist/shared/chunk-yrwsqc6r.js +0 -5
@@ -1,5 +1,17 @@
1
1
  // @bun
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`
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`
3
15
  CREATE TABLE IF NOT EXISTS folders (
4
16
  id VARCHAR(25) PRIMARY KEY,
5
17
  name VARCHAR(255) NOT NULL,
@@ -21,31 +33,64 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
21
33
  CONSTRAINT fk_folders_color FOREIGN KEY (color_id) REFERENCES colors(id) ON DELETE SET NULL,
22
34
  CONSTRAINT fk_folders_parent FOREIGN KEY (parent_id) REFERENCES folders(id) ON DELETE CASCADE
23
35
  )
24
- `,await h`
36
+ `;
37
+ await tx`
25
38
  CREATE INDEX IF NOT EXISTS idx_folders_name ON folders(name)
26
- `,await h`
39
+ `;
40
+ await tx`
27
41
  CREATE INDEX IF NOT EXISTS idx_folders_color_id ON folders(color_id)
28
- `,await h`
42
+ `;
43
+ await tx`
29
44
  CREATE INDEX IF NOT EXISTS idx_folders_parent_id ON folders(parent_id)
30
- `,await h`
45
+ `;
46
+ await tx`
31
47
  CREATE INDEX IF NOT EXISTS idx_folders_context ON folders(context, context_id)
32
- `,await h`
48
+ `;
49
+ await tx`
33
50
  CREATE INDEX IF NOT EXISTS idx_folders_language ON folders(language)
34
- `,await h`
51
+ `;
52
+ await tx`
35
53
  CREATE INDEX IF NOT EXISTS idx_folders_deleted_at ON folders(deleted_at)
36
- `,await h`
54
+ `;
55
+ await tx`
37
56
  CREATE INDEX IF NOT EXISTS idx_folders_is_public ON folders(is_public) WHERE deleted_at IS NULL
38
- `,await h`
57
+ `;
58
+ await tx`
39
59
  CREATE INDEX IF NOT EXISTS idx_folders_name_lower ON folders(LOWER(name)) WHERE deleted_at IS NULL
40
- `,await h`
60
+ `;
61
+ await tx`
41
62
  CREATE INDEX IF NOT EXISTS idx_folders_parent_name ON folders(parent_id, name) WHERE deleted_at IS NULL
42
- `,await h`
63
+ `;
64
+ await tx`
43
65
  CREATE INDEX IF NOT EXISTS idx_folders_created_at ON folders(created_at DESC)
44
- `,await h`
66
+ `;
67
+ await tx`
45
68
  CREATE INDEX IF NOT EXISTS idx_folders_updated_at ON folders(updated_at DESC)
46
- `,await h`
69
+ `;
70
+ await tx`
47
71
  CREATE INDEX IF NOT EXISTS idx_folders_active ON folders(is_blocked, is_locked) WHERE deleted_at IS NULL AND is_blocked = false
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`
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`
49
94
  CREATE TABLE IF NOT EXISTS folders_stats (
50
95
  id VARCHAR(25) PRIMARY KEY,
51
96
  folder_id VARCHAR(25),
@@ -69,27 +114,58 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
69
114
  deleted_at TIMESTAMPTZ,
70
115
  CONSTRAINT fk_folders_stats_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
71
116
  )
72
- `,await h`
117
+ `;
118
+ await tx`
73
119
  CREATE INDEX IF NOT EXISTS idx_folders_stats_folder_id ON folders_stats(folder_id)
74
- `,await h`
120
+ `;
121
+ await tx`
75
122
  CREATE INDEX IF NOT EXISTS idx_folders_stats_likes_count ON folders_stats(likes_count DESC)
76
- `,await h`
123
+ `;
124
+ await tx`
77
125
  CREATE INDEX IF NOT EXISTS idx_folders_stats_views_count ON folders_stats(views_count DESC)
78
- `,await h`
126
+ `;
127
+ await tx`
79
128
  CREATE INDEX IF NOT EXISTS idx_folders_stats_downloads_count ON folders_stats(downloads_count DESC)
80
- `,await h`
129
+ `;
130
+ await tx`
81
131
  CREATE INDEX IF NOT EXISTS idx_folders_stats_language ON folders_stats(language)
82
- `,await h`
132
+ `;
133
+ await tx`
83
134
  CREATE INDEX IF NOT EXISTS idx_folders_stats_deleted_at ON folders_stats(deleted_at)
84
- `,await h`
135
+ `;
136
+ await tx`
85
137
  CREATE INDEX IF NOT EXISTS idx_folders_stats_is_public ON folders_stats(is_public) WHERE deleted_at IS NULL
86
- `,await h`
138
+ `;
139
+ await tx`
87
140
  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
88
- `,await h`
141
+ `;
142
+ await tx`
89
143
  CREATE INDEX IF NOT EXISTS idx_folders_stats_created_at ON folders_stats(created_at DESC)
90
- `,await h`
144
+ `;
145
+ await tx`
91
146
  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
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`
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`
93
169
  CREATE TABLE IF NOT EXISTS folders_comments (
94
170
  id VARCHAR(25) PRIMARY KEY,
95
171
  folder_id VARCHAR(25),
@@ -110,25 +186,55 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
110
186
  CONSTRAINT fk_folders_comments_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE,
111
187
  CONSTRAINT fk_folders_comments_parent FOREIGN KEY (parent_comment_id) REFERENCES folders_comments(id) ON DELETE CASCADE
112
188
  )
113
- `,await h`
189
+ `;
190
+ await tx`
114
191
  CREATE INDEX IF NOT EXISTS idx_folders_comments_folder_id ON folders_comments(folder_id)
115
- `,await h`
192
+ `;
193
+ await tx`
116
194
  CREATE INDEX IF NOT EXISTS idx_folders_comments_commented_by_id ON folders_comments(commented_by_id)
117
- `,await h`
195
+ `;
196
+ await tx`
118
197
  CREATE INDEX IF NOT EXISTS idx_folders_comments_parent_comment_id ON folders_comments(parent_comment_id)
119
- `,await h`
198
+ `;
199
+ await tx`
120
200
  CREATE INDEX IF NOT EXISTS idx_folders_comments_language ON folders_comments(language)
121
- `,await h`
201
+ `;
202
+ await tx`
122
203
  CREATE INDEX IF NOT EXISTS idx_folders_comments_deleted_at ON folders_comments(deleted_at)
123
- `,await h`
204
+ `;
205
+ await tx`
124
206
  CREATE INDEX IF NOT EXISTS idx_folders_comments_is_public ON folders_comments(is_public) WHERE deleted_at IS NULL
125
- `,await h`
207
+ `;
208
+ await tx`
126
209
  CREATE INDEX IF NOT EXISTS idx_folders_comments_created_at ON folders_comments(created_at DESC)
127
- `,await h`
210
+ `;
211
+ await tx`
128
212
  CREATE INDEX IF NOT EXISTS idx_folders_comments_folder_created ON folders_comments(folder_id, created_at DESC) WHERE deleted_at IS NULL
129
- `,await h`
213
+ `;
214
+ await tx`
130
215
  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
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`
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`
132
238
  CREATE TABLE IF NOT EXISTS folders_liked (
133
239
  id VARCHAR(25) PRIMARY KEY,
134
240
  folder_id VARCHAR(25),
@@ -146,23 +252,52 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
146
252
  deleted_at TIMESTAMPTZ,
147
253
  CONSTRAINT fk_folders_liked_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
148
254
  )
149
- `,await h`
255
+ `;
256
+ await tx`
150
257
  CREATE INDEX IF NOT EXISTS idx_folders_liked_folder_id ON folders_liked(folder_id)
151
- `,await h`
258
+ `;
259
+ await tx`
152
260
  CREATE INDEX IF NOT EXISTS idx_folders_liked_liked_by_id ON folders_liked(liked_by_id)
153
- `,await h`
261
+ `;
262
+ await tx`
154
263
  CREATE INDEX IF NOT EXISTS idx_folders_liked_language ON folders_liked(language)
155
- `,await h`
264
+ `;
265
+ await tx`
156
266
  CREATE INDEX IF NOT EXISTS idx_folders_liked_deleted_at ON folders_liked(deleted_at)
157
- `,await h`
267
+ `;
268
+ await tx`
158
269
  CREATE INDEX IF NOT EXISTS idx_folders_liked_is_public ON folders_liked(is_public) WHERE deleted_at IS NULL
159
- `,await h`
270
+ `;
271
+ await tx`
160
272
  CREATE INDEX IF NOT EXISTS idx_folders_liked_created_at ON folders_liked(created_at DESC)
161
- `,await h`
273
+ `;
274
+ await tx`
162
275
  CREATE INDEX IF NOT EXISTS idx_folders_liked_folder_user ON folders_liked(folder_id, liked_by_id) WHERE deleted_at IS NULL
163
- `,await h`
276
+ `;
277
+ await tx`
164
278
  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
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`
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`
166
301
  CREATE TABLE IF NOT EXISTS folders_disliked (
167
302
  id VARCHAR(25) PRIMARY KEY,
168
303
  folder_id VARCHAR(25),
@@ -180,23 +315,52 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
180
315
  deleted_at TIMESTAMPTZ,
181
316
  CONSTRAINT fk_folders_disliked_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
182
317
  )
183
- `,await h`
318
+ `;
319
+ await tx`
184
320
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_folder_id ON folders_disliked(folder_id)
185
- `,await h`
321
+ `;
322
+ await tx`
186
323
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_disliked_by_id ON folders_disliked(disliked_by_id)
187
- `,await h`
324
+ `;
325
+ await tx`
188
326
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_language ON folders_disliked(language)
189
- `,await h`
327
+ `;
328
+ await tx`
190
329
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_deleted_at ON folders_disliked(deleted_at)
191
- `,await h`
330
+ `;
331
+ await tx`
192
332
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_is_public ON folders_disliked(is_public) WHERE deleted_at IS NULL
193
- `,await h`
333
+ `;
334
+ await tx`
194
335
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_created_at ON folders_disliked(created_at DESC)
195
- `,await h`
336
+ `;
337
+ await tx`
196
338
  CREATE INDEX IF NOT EXISTS idx_folders_disliked_folder_user ON folders_disliked(folder_id, disliked_by_id) WHERE deleted_at IS NULL
197
- `,await h`
339
+ `;
340
+ await tx`
198
341
  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
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`
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`
200
364
  CREATE TABLE IF NOT EXISTS folders_viewed (
201
365
  id VARCHAR(25) PRIMARY KEY,
202
366
  folder_id VARCHAR(25),
@@ -214,23 +378,52 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
214
378
  deleted_at TIMESTAMPTZ,
215
379
  CONSTRAINT fk_folders_viewed_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
216
380
  )
217
- `,await h`
381
+ `;
382
+ await tx`
218
383
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_folder_id ON folders_viewed(folder_id)
219
- `,await h`
384
+ `;
385
+ await tx`
220
386
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_viewed_by_id ON folders_viewed(viewed_by_id)
221
- `,await h`
387
+ `;
388
+ await tx`
222
389
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_language ON folders_viewed(language)
223
- `,await h`
390
+ `;
391
+ await tx`
224
392
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_deleted_at ON folders_viewed(deleted_at)
225
- `,await h`
393
+ `;
394
+ await tx`
226
395
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_is_public ON folders_viewed(is_public) WHERE deleted_at IS NULL
227
- `,await h`
396
+ `;
397
+ await tx`
228
398
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_created_at ON folders_viewed(created_at DESC)
229
- `,await h`
399
+ `;
400
+ await tx`
230
401
  CREATE INDEX IF NOT EXISTS idx_folders_viewed_folder_user ON folders_viewed(folder_id, viewed_by_id) WHERE deleted_at IS NULL
231
- `,await h`
402
+ `;
403
+ await tx`
232
404
  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
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`
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`
234
427
  CREATE TABLE IF NOT EXISTS folders_saved (
235
428
  id VARCHAR(25) PRIMARY KEY,
236
429
  folder_id VARCHAR(25),
@@ -248,23 +441,52 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
248
441
  deleted_at TIMESTAMPTZ,
249
442
  CONSTRAINT fk_folders_saved_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
250
443
  )
251
- `,await h`
444
+ `;
445
+ await tx`
252
446
  CREATE INDEX IF NOT EXISTS idx_folders_saved_folder_id ON folders_saved(folder_id)
253
- `,await h`
447
+ `;
448
+ await tx`
254
449
  CREATE INDEX IF NOT EXISTS idx_folders_saved_saved_by_id ON folders_saved(saved_by_id)
255
- `,await h`
450
+ `;
451
+ await tx`
256
452
  CREATE INDEX IF NOT EXISTS idx_folders_saved_language ON folders_saved(language)
257
- `,await h`
453
+ `;
454
+ await tx`
258
455
  CREATE INDEX IF NOT EXISTS idx_folders_saved_deleted_at ON folders_saved(deleted_at)
259
- `,await h`
456
+ `;
457
+ await tx`
260
458
  CREATE INDEX IF NOT EXISTS idx_folders_saved_is_public ON folders_saved(is_public) WHERE deleted_at IS NULL
261
- `,await h`
459
+ `;
460
+ await tx`
262
461
  CREATE INDEX IF NOT EXISTS idx_folders_saved_created_at ON folders_saved(created_at DESC)
263
- `,await h`
462
+ `;
463
+ await tx`
264
464
  CREATE INDEX IF NOT EXISTS idx_folders_saved_folder_user ON folders_saved(folder_id, saved_by_id) WHERE deleted_at IS NULL
265
- `,await h`
465
+ `;
466
+ await tx`
266
467
  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
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`
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`
268
490
  CREATE TABLE IF NOT EXISTS folders_downloaded (
269
491
  id VARCHAR(25) PRIMARY KEY,
270
492
  folder_id VARCHAR(25),
@@ -282,23 +504,52 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
282
504
  deleted_at TIMESTAMPTZ,
283
505
  CONSTRAINT fk_folders_downloaded_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
284
506
  )
285
- `,await h`
507
+ `;
508
+ await tx`
286
509
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_folder_id ON folders_downloaded(folder_id)
287
- `,await h`
510
+ `;
511
+ await tx`
288
512
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_downloaded_by_id ON folders_downloaded(downloaded_by_id)
289
- `,await h`
513
+ `;
514
+ await tx`
290
515
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_language ON folders_downloaded(language)
291
- `,await h`
516
+ `;
517
+ await tx`
292
518
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_deleted_at ON folders_downloaded(deleted_at)
293
- `,await h`
519
+ `;
520
+ await tx`
294
521
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_is_public ON folders_downloaded(is_public) WHERE deleted_at IS NULL
295
- `,await h`
522
+ `;
523
+ await tx`
296
524
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_created_at ON folders_downloaded(created_at DESC)
297
- `,await h`
525
+ `;
526
+ await tx`
298
527
  CREATE INDEX IF NOT EXISTS idx_folders_downloaded_folder_user ON folders_downloaded(folder_id, downloaded_by_id) WHERE deleted_at IS NULL
299
- `,await h`
528
+ `;
529
+ await tx`
300
530
  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
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`
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`
302
553
  CREATE TABLE IF NOT EXISTS folders_shared (
303
554
  id VARCHAR(25) PRIMARY KEY,
304
555
  folder_id VARCHAR(25),
@@ -318,29 +569,61 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
318
569
  deleted_at TIMESTAMPTZ,
319
570
  CONSTRAINT fk_folders_shared_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE
320
571
  )
321
- `,await h`
572
+ `;
573
+ await tx`
322
574
  CREATE INDEX IF NOT EXISTS idx_folders_shared_folder_id ON folders_shared(folder_id)
323
- `,await h`
575
+ `;
576
+ await tx`
324
577
  CREATE INDEX IF NOT EXISTS idx_folders_shared_shared_by_id ON folders_shared(shared_by_id)
325
- `,await h`
578
+ `;
579
+ await tx`
326
580
  CREATE INDEX IF NOT EXISTS idx_folders_shared_permission ON folders_shared(permission)
327
- `,await h`
581
+ `;
582
+ await tx`
328
583
  CREATE INDEX IF NOT EXISTS idx_folders_shared_expires_at ON folders_shared(expires_at)
329
- `,await h`
584
+ `;
585
+ await tx`
330
586
  CREATE INDEX IF NOT EXISTS idx_folders_shared_language ON folders_shared(language)
331
- `,await h`
587
+ `;
588
+ await tx`
332
589
  CREATE INDEX IF NOT EXISTS idx_folders_shared_deleted_at ON folders_shared(deleted_at)
333
- `,await h`
590
+ `;
591
+ await tx`
334
592
  CREATE INDEX IF NOT EXISTS idx_folders_shared_is_public ON folders_shared(is_public) WHERE deleted_at IS NULL
335
- `,await h`
593
+ `;
594
+ await tx`
336
595
  CREATE INDEX IF NOT EXISTS idx_folders_shared_created_at ON folders_shared(created_at DESC)
337
- `,await h`
596
+ `;
597
+ await tx`
338
598
  CREATE INDEX IF NOT EXISTS idx_folders_shared_folder_user ON folders_shared(folder_id, shared_by_id) WHERE deleted_at IS NULL
339
- `,await h`
599
+ `;
600
+ await tx`
340
601
  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
341
- `,await h`
602
+ `;
603
+ await tx`
342
604
  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()
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`
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`
344
627
  CREATE TABLE IF NOT EXISTS folders_reports (
345
628
  id VARCHAR(25) PRIMARY KEY,
346
629
  folder_id VARCHAR(25),
@@ -362,26 +645,65 @@ import{d as H,e as I}from"../../../shared/chunk-31y260d6.js";import{Ha as p}from
362
645
  CONSTRAINT fk_folders_reports_folder FOREIGN KEY (folder_id) REFERENCES folders(id) ON DELETE CASCADE,
363
646
  CONSTRAINT fk_folders_reports_status FOREIGN KEY (status_id) REFERENCES statuses(id) ON DELETE SET NULL
364
647
  )
365
- `,await h`
648
+ `;
649
+ await tx`
366
650
  CREATE INDEX IF NOT EXISTS idx_folders_reports_folder_id ON folders_reports(folder_id)
367
- `,await h`
651
+ `;
652
+ await tx`
368
653
  CREATE INDEX IF NOT EXISTS idx_folders_reports_reported_by_id ON folders_reports(reported_by_id)
369
- `,await h`
654
+ `;
655
+ await tx`
370
656
  CREATE INDEX IF NOT EXISTS idx_folders_reports_status_id ON folders_reports(status_id)
371
- `,await h`
657
+ `;
658
+ await tx`
372
659
  CREATE INDEX IF NOT EXISTS idx_folders_reports_reason ON folders_reports(reason)
373
- `,await h`
660
+ `;
661
+ await tx`
374
662
  CREATE INDEX IF NOT EXISTS idx_folders_reports_language ON folders_reports(language)
375
- `,await h`
663
+ `;
664
+ await tx`
376
665
  CREATE INDEX IF NOT EXISTS idx_folders_reports_deleted_at ON folders_reports(deleted_at)
377
- `,await h`
666
+ `;
667
+ await tx`
378
668
  CREATE INDEX IF NOT EXISTS idx_folders_reports_is_public ON folders_reports(is_public) WHERE deleted_at IS NULL
379
- `,await h`
669
+ `;
670
+ await tx`
380
671
  CREATE INDEX IF NOT EXISTS idx_folders_reports_created_at ON folders_reports(created_at DESC)
381
- `,await h`
672
+ `;
673
+ await tx`
382
674
  CREATE INDEX IF NOT EXISTS idx_folders_reports_folder_status ON folders_reports(folder_id, status_id) WHERE deleted_at IS NULL
383
- `,await h`
675
+ `;
676
+ await tx`
384
677
  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
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};
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
+ };
386
708
 
387
- //# debugId=2834BF9E9B20B0A364756E2164756E21
709
+ //# debugId=6DDDB58BDDF7223C64756E2164756E21