@adatechnology/content-module 0.0.0-stage → 0.2.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.
@@ -0,0 +1,213 @@
1
+ {
2
+ "id": "63c0d6a1-2bbe-4972-ac46-7a148d6ef377",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "content.posts": {
8
+ "name": "posts",
9
+ "schema": "content",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "company_id": {
19
+ "name": "company_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "slug": {
25
+ "name": "slug",
26
+ "type": "varchar(120)",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "title": {
31
+ "name": "title",
32
+ "type": "varchar(200)",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "excerpt": {
37
+ "name": "excerpt",
38
+ "type": "varchar(500)",
39
+ "primaryKey": false,
40
+ "notNull": false
41
+ },
42
+ "body": {
43
+ "name": "body",
44
+ "type": "text",
45
+ "primaryKey": false,
46
+ "notNull": true,
47
+ "default": "''"
48
+ },
49
+ "cover_image_url": {
50
+ "name": "cover_image_url",
51
+ "type": "varchar(2048)",
52
+ "primaryKey": false,
53
+ "notNull": false
54
+ },
55
+ "cover_image_alt": {
56
+ "name": "cover_image_alt",
57
+ "type": "varchar(300)",
58
+ "primaryKey": false,
59
+ "notNull": false
60
+ },
61
+ "tags": {
62
+ "name": "tags",
63
+ "type": "text[]",
64
+ "primaryKey": false,
65
+ "notNull": true,
66
+ "default": "'{}'"
67
+ },
68
+ "status": {
69
+ "name": "status",
70
+ "type": "varchar(12)",
71
+ "primaryKey": false,
72
+ "notNull": true,
73
+ "default": "'draft'"
74
+ },
75
+ "published_at": {
76
+ "name": "published_at",
77
+ "type": "timestamp with time zone",
78
+ "primaryKey": false,
79
+ "notNull": false
80
+ },
81
+ "author_name": {
82
+ "name": "author_name",
83
+ "type": "varchar(120)",
84
+ "primaryKey": false,
85
+ "notNull": false
86
+ },
87
+ "seo_title": {
88
+ "name": "seo_title",
89
+ "type": "varchar(200)",
90
+ "primaryKey": false,
91
+ "notNull": false
92
+ },
93
+ "seo_description": {
94
+ "name": "seo_description",
95
+ "type": "varchar(320)",
96
+ "primaryKey": false,
97
+ "notNull": false
98
+ },
99
+ "canonical_url": {
100
+ "name": "canonical_url",
101
+ "type": "varchar(2048)",
102
+ "primaryKey": false,
103
+ "notNull": false
104
+ },
105
+ "reading_time_minutes": {
106
+ "name": "reading_time_minutes",
107
+ "type": "integer",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "default": 1
111
+ },
112
+ "created_at": {
113
+ "name": "created_at",
114
+ "type": "timestamp with time zone",
115
+ "primaryKey": false,
116
+ "notNull": true,
117
+ "default": "now()"
118
+ },
119
+ "updated_at": {
120
+ "name": "updated_at",
121
+ "type": "timestamp with time zone",
122
+ "primaryKey": false,
123
+ "notNull": true,
124
+ "default": "now()"
125
+ }
126
+ },
127
+ "indexes": {
128
+ "idx_posts_company_slug": {
129
+ "name": "idx_posts_company_slug",
130
+ "columns": [
131
+ {
132
+ "expression": "company_id",
133
+ "isExpression": false,
134
+ "asc": true,
135
+ "nulls": "last"
136
+ },
137
+ {
138
+ "expression": "slug",
139
+ "isExpression": false,
140
+ "asc": true,
141
+ "nulls": "last"
142
+ }
143
+ ],
144
+ "isUnique": true,
145
+ "concurrently": false,
146
+ "method": "btree",
147
+ "with": {}
148
+ },
149
+ "idx_posts_company_status_published": {
150
+ "name": "idx_posts_company_status_published",
151
+ "columns": [
152
+ {
153
+ "expression": "company_id",
154
+ "isExpression": false,
155
+ "asc": true,
156
+ "nulls": "last"
157
+ },
158
+ {
159
+ "expression": "status",
160
+ "isExpression": false,
161
+ "asc": true,
162
+ "nulls": "last"
163
+ },
164
+ {
165
+ "expression": "published_at",
166
+ "isExpression": false,
167
+ "asc": true,
168
+ "nulls": "last"
169
+ }
170
+ ],
171
+ "isUnique": false,
172
+ "concurrently": false,
173
+ "method": "btree",
174
+ "with": {}
175
+ },
176
+ "idx_posts_tags": {
177
+ "name": "idx_posts_tags",
178
+ "columns": [
179
+ {
180
+ "expression": "tags",
181
+ "isExpression": false,
182
+ "asc": true,
183
+ "nulls": "last"
184
+ }
185
+ ],
186
+ "isUnique": false,
187
+ "concurrently": false,
188
+ "method": "gin",
189
+ "with": {}
190
+ }
191
+ },
192
+ "foreignKeys": {},
193
+ "compositePrimaryKeys": {},
194
+ "uniqueConstraints": {},
195
+ "policies": {},
196
+ "checkConstraints": {},
197
+ "isRLSEnabled": false
198
+ }
199
+ },
200
+ "enums": {},
201
+ "schemas": {
202
+ "content": "content"
203
+ },
204
+ "sequences": {},
205
+ "roles": {},
206
+ "policies": {},
207
+ "views": {},
208
+ "_meta": {
209
+ "columns": {},
210
+ "schemas": {},
211
+ "tables": {}
212
+ }
213
+ }
@@ -0,0 +1,454 @@
1
+ {
2
+ "id": "991a2a50-c91b-493f-90ec-d697ef880107",
3
+ "prevId": "63c0d6a1-2bbe-4972-ac46-7a148d6ef377",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "content.post_former_slugs": {
8
+ "name": "post_former_slugs",
9
+ "schema": "content",
10
+ "columns": {
11
+ "company_id": {
12
+ "name": "company_id",
13
+ "type": "uuid",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "slug": {
18
+ "name": "slug",
19
+ "type": "varchar(120)",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "post_id": {
24
+ "name": "post_id",
25
+ "type": "uuid",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "created_at": {
30
+ "name": "created_at",
31
+ "type": "timestamp with time zone",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "default": "now()"
35
+ }
36
+ },
37
+ "indexes": {},
38
+ "foreignKeys": {
39
+ "post_former_slugs_post_id_posts_id_fk": {
40
+ "name": "post_former_slugs_post_id_posts_id_fk",
41
+ "tableFrom": "post_former_slugs",
42
+ "tableTo": "posts",
43
+ "schemaTo": "content",
44
+ "columnsFrom": [
45
+ "post_id"
46
+ ],
47
+ "columnsTo": [
48
+ "id"
49
+ ],
50
+ "onDelete": "no action",
51
+ "onUpdate": "no action"
52
+ }
53
+ },
54
+ "compositePrimaryKeys": {
55
+ "post_former_slugs_company_id_slug_pk": {
56
+ "name": "post_former_slugs_company_id_slug_pk",
57
+ "columns": [
58
+ "company_id",
59
+ "slug"
60
+ ]
61
+ }
62
+ },
63
+ "uniqueConstraints": {},
64
+ "policies": {},
65
+ "checkConstraints": {},
66
+ "isRLSEnabled": false
67
+ },
68
+ "content.posts": {
69
+ "name": "posts",
70
+ "schema": "content",
71
+ "columns": {
72
+ "id": {
73
+ "name": "id",
74
+ "type": "uuid",
75
+ "primaryKey": true,
76
+ "notNull": true,
77
+ "default": "gen_random_uuid()"
78
+ },
79
+ "company_id": {
80
+ "name": "company_id",
81
+ "type": "uuid",
82
+ "primaryKey": false,
83
+ "notNull": true
84
+ },
85
+ "slug": {
86
+ "name": "slug",
87
+ "type": "varchar(120)",
88
+ "primaryKey": false,
89
+ "notNull": true
90
+ },
91
+ "short_id": {
92
+ "name": "short_id",
93
+ "type": "varchar(6)",
94
+ "primaryKey": false,
95
+ "notNull": true
96
+ },
97
+ "title": {
98
+ "name": "title",
99
+ "type": "varchar(200)",
100
+ "primaryKey": false,
101
+ "notNull": true
102
+ },
103
+ "excerpt": {
104
+ "name": "excerpt",
105
+ "type": "varchar(500)",
106
+ "primaryKey": false,
107
+ "notNull": false
108
+ },
109
+ "body": {
110
+ "name": "body",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true,
114
+ "default": "''"
115
+ },
116
+ "cover_image_url": {
117
+ "name": "cover_image_url",
118
+ "type": "varchar(2048)",
119
+ "primaryKey": false,
120
+ "notNull": false
121
+ },
122
+ "cover_image_alt": {
123
+ "name": "cover_image_alt",
124
+ "type": "varchar(300)",
125
+ "primaryKey": false,
126
+ "notNull": false
127
+ },
128
+ "tags": {
129
+ "name": "tags",
130
+ "type": "text[]",
131
+ "primaryKey": false,
132
+ "notNull": true,
133
+ "default": "'{}'"
134
+ },
135
+ "tag_labels": {
136
+ "name": "tag_labels",
137
+ "type": "jsonb",
138
+ "primaryKey": false,
139
+ "notNull": true,
140
+ "default": "'{}'::jsonb"
141
+ },
142
+ "status": {
143
+ "name": "status",
144
+ "type": "varchar(12)",
145
+ "primaryKey": false,
146
+ "notNull": true,
147
+ "default": "'draft'"
148
+ },
149
+ "is_template": {
150
+ "name": "is_template",
151
+ "type": "boolean",
152
+ "primaryKey": false,
153
+ "notNull": true,
154
+ "default": false
155
+ },
156
+ "published_at": {
157
+ "name": "published_at",
158
+ "type": "timestamp with time zone",
159
+ "primaryKey": false,
160
+ "notNull": false
161
+ },
162
+ "author_name": {
163
+ "name": "author_name",
164
+ "type": "varchar(120)",
165
+ "primaryKey": false,
166
+ "notNull": false
167
+ },
168
+ "seo_title": {
169
+ "name": "seo_title",
170
+ "type": "varchar(200)",
171
+ "primaryKey": false,
172
+ "notNull": false
173
+ },
174
+ "seo_description": {
175
+ "name": "seo_description",
176
+ "type": "varchar(320)",
177
+ "primaryKey": false,
178
+ "notNull": false
179
+ },
180
+ "canonical_url": {
181
+ "name": "canonical_url",
182
+ "type": "varchar(2048)",
183
+ "primaryKey": false,
184
+ "notNull": false
185
+ },
186
+ "reading_time_minutes": {
187
+ "name": "reading_time_minutes",
188
+ "type": "integer",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "default": 1
192
+ },
193
+ "created_at": {
194
+ "name": "created_at",
195
+ "type": "timestamp with time zone",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "default": "now()"
199
+ },
200
+ "updated_at": {
201
+ "name": "updated_at",
202
+ "type": "timestamp with time zone",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": "now()"
206
+ }
207
+ },
208
+ "indexes": {
209
+ "idx_posts_company_slug": {
210
+ "name": "idx_posts_company_slug",
211
+ "columns": [
212
+ {
213
+ "expression": "company_id",
214
+ "isExpression": false,
215
+ "asc": true,
216
+ "nulls": "last"
217
+ },
218
+ {
219
+ "expression": "slug",
220
+ "isExpression": false,
221
+ "asc": true,
222
+ "nulls": "last"
223
+ }
224
+ ],
225
+ "isUnique": true,
226
+ "concurrently": false,
227
+ "method": "btree",
228
+ "with": {}
229
+ },
230
+ "idx_posts_company_short_id": {
231
+ "name": "idx_posts_company_short_id",
232
+ "columns": [
233
+ {
234
+ "expression": "company_id",
235
+ "isExpression": false,
236
+ "asc": true,
237
+ "nulls": "last"
238
+ },
239
+ {
240
+ "expression": "short_id",
241
+ "isExpression": false,
242
+ "asc": true,
243
+ "nulls": "last"
244
+ }
245
+ ],
246
+ "isUnique": true,
247
+ "concurrently": false,
248
+ "method": "btree",
249
+ "with": {}
250
+ },
251
+ "idx_posts_company_status_published": {
252
+ "name": "idx_posts_company_status_published",
253
+ "columns": [
254
+ {
255
+ "expression": "company_id",
256
+ "isExpression": false,
257
+ "asc": true,
258
+ "nulls": "last"
259
+ },
260
+ {
261
+ "expression": "status",
262
+ "isExpression": false,
263
+ "asc": true,
264
+ "nulls": "last"
265
+ },
266
+ {
267
+ "expression": "published_at",
268
+ "isExpression": false,
269
+ "asc": true,
270
+ "nulls": "last"
271
+ }
272
+ ],
273
+ "isUnique": false,
274
+ "concurrently": false,
275
+ "method": "btree",
276
+ "with": {}
277
+ },
278
+ "idx_posts_tags": {
279
+ "name": "idx_posts_tags",
280
+ "columns": [
281
+ {
282
+ "expression": "tags",
283
+ "isExpression": false,
284
+ "asc": true,
285
+ "nulls": "last"
286
+ }
287
+ ],
288
+ "isUnique": false,
289
+ "concurrently": false,
290
+ "method": "gin",
291
+ "with": {}
292
+ },
293
+ "idx_posts_due": {
294
+ "name": "idx_posts_due",
295
+ "columns": [
296
+ {
297
+ "expression": "published_at",
298
+ "isExpression": false,
299
+ "asc": true,
300
+ "nulls": "last"
301
+ }
302
+ ],
303
+ "isUnique": false,
304
+ "where": "\"status\" = 'scheduled'",
305
+ "concurrently": false,
306
+ "method": "btree",
307
+ "with": {}
308
+ }
309
+ },
310
+ "foreignKeys": {},
311
+ "compositePrimaryKeys": {},
312
+ "uniqueConstraints": {},
313
+ "policies": {},
314
+ "checkConstraints": {},
315
+ "isRLSEnabled": false
316
+ },
317
+ "content.recurrence_rules": {
318
+ "name": "recurrence_rules",
319
+ "schema": "content",
320
+ "columns": {
321
+ "id": {
322
+ "name": "id",
323
+ "type": "uuid",
324
+ "primaryKey": true,
325
+ "notNull": true,
326
+ "default": "gen_random_uuid()"
327
+ },
328
+ "company_id": {
329
+ "name": "company_id",
330
+ "type": "uuid",
331
+ "primaryKey": false,
332
+ "notNull": true
333
+ },
334
+ "template_id": {
335
+ "name": "template_id",
336
+ "type": "uuid",
337
+ "primaryKey": false,
338
+ "notNull": true
339
+ },
340
+ "frequency": {
341
+ "name": "frequency",
342
+ "type": "varchar(10)",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "anchor_day": {
347
+ "name": "anchor_day",
348
+ "type": "integer",
349
+ "primaryKey": false,
350
+ "notNull": true
351
+ },
352
+ "is_active": {
353
+ "name": "is_active",
354
+ "type": "boolean",
355
+ "primaryKey": false,
356
+ "notNull": true,
357
+ "default": true
358
+ },
359
+ "next_run_at": {
360
+ "name": "next_run_at",
361
+ "type": "timestamp with time zone",
362
+ "primaryKey": false,
363
+ "notNull": true
364
+ },
365
+ "last_run_at": {
366
+ "name": "last_run_at",
367
+ "type": "timestamp with time zone",
368
+ "primaryKey": false,
369
+ "notNull": false
370
+ },
371
+ "last_post_id": {
372
+ "name": "last_post_id",
373
+ "type": "uuid",
374
+ "primaryKey": false,
375
+ "notNull": false
376
+ },
377
+ "created_at": {
378
+ "name": "created_at",
379
+ "type": "timestamp with time zone",
380
+ "primaryKey": false,
381
+ "notNull": true,
382
+ "default": "now()"
383
+ }
384
+ },
385
+ "indexes": {
386
+ "idx_recurrence_company": {
387
+ "name": "idx_recurrence_company",
388
+ "columns": [
389
+ {
390
+ "expression": "company_id",
391
+ "isExpression": false,
392
+ "asc": true,
393
+ "nulls": "last"
394
+ }
395
+ ],
396
+ "isUnique": false,
397
+ "concurrently": false,
398
+ "method": "btree",
399
+ "with": {}
400
+ },
401
+ "idx_recurrence_due": {
402
+ "name": "idx_recurrence_due",
403
+ "columns": [
404
+ {
405
+ "expression": "next_run_at",
406
+ "isExpression": false,
407
+ "asc": true,
408
+ "nulls": "last"
409
+ }
410
+ ],
411
+ "isUnique": false,
412
+ "where": "\"is_active\"",
413
+ "concurrently": false,
414
+ "method": "btree",
415
+ "with": {}
416
+ }
417
+ },
418
+ "foreignKeys": {
419
+ "recurrence_rules_template_id_posts_id_fk": {
420
+ "name": "recurrence_rules_template_id_posts_id_fk",
421
+ "tableFrom": "recurrence_rules",
422
+ "tableTo": "posts",
423
+ "schemaTo": "content",
424
+ "columnsFrom": [
425
+ "template_id"
426
+ ],
427
+ "columnsTo": [
428
+ "id"
429
+ ],
430
+ "onDelete": "no action",
431
+ "onUpdate": "no action"
432
+ }
433
+ },
434
+ "compositePrimaryKeys": {},
435
+ "uniqueConstraints": {},
436
+ "policies": {},
437
+ "checkConstraints": {},
438
+ "isRLSEnabled": false
439
+ }
440
+ },
441
+ "enums": {},
442
+ "schemas": {
443
+ "content": "content"
444
+ },
445
+ "sequences": {},
446
+ "roles": {},
447
+ "policies": {},
448
+ "views": {},
449
+ "_meta": {
450
+ "columns": {},
451
+ "schemas": {},
452
+ "tables": {}
453
+ }
454
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1795646336276,
9
+ "tag": "0000_posts",
10
+ "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "7",
15
+ "when": 1795729369460,
16
+ "tag": "0001_scheduling",
17
+ "breakpoints": true
18
+ }
19
+ ]
20
+ }