@spfn/cms 0.1.0-alpha.61 → 0.1.0-alpha.63

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,3 @@
1
+ -- Initial migration for @spfn/cms
2
+ -- Create schema for CMS package
3
+ CREATE SCHEMA IF NOT EXISTS spfn_cms;
@@ -1,6 +1,3 @@
1
- -- Create schema for CMS package
2
- CREATE SCHEMA IF NOT EXISTS spfn_cms;
3
- --> statement-breakpoint
4
1
  CREATE TABLE "spfn_cms"."audit_logs" (
5
2
  "id" serial PRIMARY KEY NOT NULL,
6
3
  "label_id" integer,
@@ -1,687 +1,15 @@
1
1
  {
2
- "id": "12c07e37-d73c-4539-9032-ba2dc46ba653",
3
- "prevId": "00000000-0000-0000-0000-000000000000",
2
+ "id": "00000000-0000-0000-0000-000000000000",
3
+ "prevId": "",
4
4
  "version": "7",
5
5
  "dialect": "postgresql",
6
- "tables": {
7
- "spfn_cms.audit_logs": {
8
- "name": "audit_logs",
9
- "schema": "spfn_cms",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "serial",
14
- "primaryKey": true,
15
- "notNull": true
16
- },
17
- "label_id": {
18
- "name": "label_id",
19
- "type": "integer",
20
- "primaryKey": false,
21
- "notNull": false
22
- },
23
- "action": {
24
- "name": "action",
25
- "type": "text",
26
- "primaryKey": false,
27
- "notNull": true
28
- },
29
- "user_id": {
30
- "name": "user_id",
31
- "type": "text",
32
- "primaryKey": false,
33
- "notNull": true
34
- },
35
- "user_name": {
36
- "name": "user_name",
37
- "type": "text",
38
- "primaryKey": false,
39
- "notNull": false
40
- },
41
- "changes": {
42
- "name": "changes",
43
- "type": "jsonb",
44
- "primaryKey": false,
45
- "notNull": false
46
- },
47
- "metadata": {
48
- "name": "metadata",
49
- "type": "jsonb",
50
- "primaryKey": false,
51
- "notNull": false
52
- },
53
- "created_at": {
54
- "name": "created_at",
55
- "type": "timestamp with time zone",
56
- "primaryKey": false,
57
- "notNull": true,
58
- "default": "now()"
59
- }
60
- },
61
- "indexes": {
62
- "cms_audit_logs_label_id_idx": {
63
- "name": "cms_audit_logs_label_id_idx",
64
- "columns": [
65
- {
66
- "expression": "label_id",
67
- "isExpression": false,
68
- "asc": true,
69
- "nulls": "last"
70
- }
71
- ],
72
- "isUnique": false,
73
- "concurrently": false,
74
- "method": "btree",
75
- "with": {}
76
- },
77
- "cms_audit_logs_user_id_idx": {
78
- "name": "cms_audit_logs_user_id_idx",
79
- "columns": [
80
- {
81
- "expression": "user_id",
82
- "isExpression": false,
83
- "asc": true,
84
- "nulls": "last"
85
- }
86
- ],
87
- "isUnique": false,
88
- "concurrently": false,
89
- "method": "btree",
90
- "with": {}
91
- },
92
- "cms_audit_logs_action_idx": {
93
- "name": "cms_audit_logs_action_idx",
94
- "columns": [
95
- {
96
- "expression": "action",
97
- "isExpression": false,
98
- "asc": true,
99
- "nulls": "last"
100
- }
101
- ],
102
- "isUnique": false,
103
- "concurrently": false,
104
- "method": "btree",
105
- "with": {}
106
- },
107
- "cms_audit_logs_created_at_idx": {
108
- "name": "cms_audit_logs_created_at_idx",
109
- "columns": [
110
- {
111
- "expression": "created_at",
112
- "isExpression": false,
113
- "asc": true,
114
- "nulls": "last"
115
- }
116
- ],
117
- "isUnique": false,
118
- "concurrently": false,
119
- "method": "btree",
120
- "with": {}
121
- }
122
- },
123
- "foreignKeys": {
124
- "audit_logs_label_id_labels_id_fk": {
125
- "name": "audit_logs_label_id_labels_id_fk",
126
- "tableFrom": "audit_logs",
127
- "tableTo": "labels",
128
- "schemaTo": "spfn_cms",
129
- "columnsFrom": [
130
- "label_id"
131
- ],
132
- "columnsTo": [
133
- "id"
134
- ],
135
- "onDelete": "set null",
136
- "onUpdate": "no action"
137
- }
138
- },
139
- "compositePrimaryKeys": {},
140
- "uniqueConstraints": {},
141
- "policies": {},
142
- "checkConstraints": {},
143
- "isRLSEnabled": false
144
- },
145
- "spfn_cms.draft_cache": {
146
- "name": "draft_cache",
147
- "schema": "spfn_cms",
148
- "columns": {
149
- "id": {
150
- "name": "id",
151
- "type": "serial",
152
- "primaryKey": true,
153
- "notNull": true
154
- },
155
- "section": {
156
- "name": "section",
157
- "type": "text",
158
- "primaryKey": false,
159
- "notNull": true
160
- },
161
- "locale": {
162
- "name": "locale",
163
- "type": "text",
164
- "primaryKey": false,
165
- "notNull": true
166
- },
167
- "user_id": {
168
- "name": "user_id",
169
- "type": "text",
170
- "primaryKey": false,
171
- "notNull": true
172
- },
173
- "content": {
174
- "name": "content",
175
- "type": "jsonb",
176
- "primaryKey": false,
177
- "notNull": true
178
- },
179
- "updated_at": {
180
- "name": "updated_at",
181
- "type": "timestamp with time zone",
182
- "primaryKey": false,
183
- "notNull": true,
184
- "default": "now()"
185
- }
186
- },
187
- "indexes": {
188
- "cms_draft_cache_section_idx": {
189
- "name": "cms_draft_cache_section_idx",
190
- "columns": [
191
- {
192
- "expression": "section",
193
- "isExpression": false,
194
- "asc": true,
195
- "nulls": "last"
196
- }
197
- ],
198
- "isUnique": false,
199
- "concurrently": false,
200
- "method": "btree",
201
- "with": {}
202
- },
203
- "cms_draft_cache_user_idx": {
204
- "name": "cms_draft_cache_user_idx",
205
- "columns": [
206
- {
207
- "expression": "user_id",
208
- "isExpression": false,
209
- "asc": true,
210
- "nulls": "last"
211
- }
212
- ],
213
- "isUnique": false,
214
- "concurrently": false,
215
- "method": "btree",
216
- "with": {}
217
- }
218
- },
219
- "foreignKeys": {},
220
- "compositePrimaryKeys": {},
221
- "uniqueConstraints": {
222
- "cms_draft_cache_unique": {
223
- "name": "cms_draft_cache_unique",
224
- "nullsNotDistinct": false,
225
- "columns": [
226
- "section",
227
- "locale",
228
- "user_id"
229
- ]
230
- }
231
- },
232
- "policies": {},
233
- "checkConstraints": {},
234
- "isRLSEnabled": false
235
- },
236
- "spfn_cms.label_values": {
237
- "name": "label_values",
238
- "schema": "spfn_cms",
239
- "columns": {
240
- "id": {
241
- "name": "id",
242
- "type": "serial",
243
- "primaryKey": true,
244
- "notNull": true
245
- },
246
- "label_id": {
247
- "name": "label_id",
248
- "type": "integer",
249
- "primaryKey": false,
250
- "notNull": true
251
- },
252
- "version": {
253
- "name": "version",
254
- "type": "integer",
255
- "primaryKey": false,
256
- "notNull": true,
257
- "default": 1
258
- },
259
- "locale": {
260
- "name": "locale",
261
- "type": "text",
262
- "primaryKey": false,
263
- "notNull": true,
264
- "default": "'ko'"
265
- },
266
- "breakpoint": {
267
- "name": "breakpoint",
268
- "type": "text",
269
- "primaryKey": false,
270
- "notNull": false
271
- },
272
- "value": {
273
- "name": "value",
274
- "type": "jsonb",
275
- "primaryKey": false,
276
- "notNull": true
277
- },
278
- "created_at": {
279
- "name": "created_at",
280
- "type": "timestamp with time zone",
281
- "primaryKey": false,
282
- "notNull": true,
283
- "default": "now()"
284
- }
285
- },
286
- "indexes": {
287
- "cms_label_values_label_version_idx": {
288
- "name": "cms_label_values_label_version_idx",
289
- "columns": [
290
- {
291
- "expression": "label_id",
292
- "isExpression": false,
293
- "asc": true,
294
- "nulls": "last"
295
- },
296
- {
297
- "expression": "version",
298
- "isExpression": false,
299
- "asc": true,
300
- "nulls": "last"
301
- }
302
- ],
303
- "isUnique": false,
304
- "concurrently": false,
305
- "method": "btree",
306
- "with": {}
307
- },
308
- "cms_label_values_locale_idx": {
309
- "name": "cms_label_values_locale_idx",
310
- "columns": [
311
- {
312
- "expression": "locale",
313
- "isExpression": false,
314
- "asc": true,
315
- "nulls": "last"
316
- }
317
- ],
318
- "isUnique": false,
319
- "concurrently": false,
320
- "method": "btree",
321
- "with": {}
322
- }
323
- },
324
- "foreignKeys": {
325
- "label_values_label_id_labels_id_fk": {
326
- "name": "label_values_label_id_labels_id_fk",
327
- "tableFrom": "label_values",
328
- "tableTo": "labels",
329
- "schemaTo": "spfn_cms",
330
- "columnsFrom": [
331
- "label_id"
332
- ],
333
- "columnsTo": [
334
- "id"
335
- ],
336
- "onDelete": "cascade",
337
- "onUpdate": "no action"
338
- }
339
- },
340
- "compositePrimaryKeys": {},
341
- "uniqueConstraints": {
342
- "cms_label_values_locale_breakpoint_unique": {
343
- "name": "cms_label_values_locale_breakpoint_unique",
344
- "nullsNotDistinct": false,
345
- "columns": [
346
- "label_id",
347
- "version",
348
- "locale",
349
- "breakpoint"
350
- ]
351
- }
352
- },
353
- "policies": {},
354
- "checkConstraints": {},
355
- "isRLSEnabled": false
356
- },
357
- "spfn_cms.label_versions": {
358
- "name": "label_versions",
359
- "schema": "spfn_cms",
360
- "columns": {
361
- "id": {
362
- "name": "id",
363
- "type": "serial",
364
- "primaryKey": true,
365
- "notNull": true
366
- },
367
- "label_id": {
368
- "name": "label_id",
369
- "type": "integer",
370
- "primaryKey": false,
371
- "notNull": true
372
- },
373
- "version": {
374
- "name": "version",
375
- "type": "integer",
376
- "primaryKey": false,
377
- "notNull": true
378
- },
379
- "status": {
380
- "name": "status",
381
- "type": "text",
382
- "primaryKey": false,
383
- "notNull": true
384
- },
385
- "published_at": {
386
- "name": "published_at",
387
- "type": "timestamp with time zone",
388
- "primaryKey": false,
389
- "notNull": false
390
- },
391
- "published_by": {
392
- "name": "published_by",
393
- "type": "text",
394
- "primaryKey": false,
395
- "notNull": false
396
- },
397
- "notes": {
398
- "name": "notes",
399
- "type": "text",
400
- "primaryKey": false,
401
- "notNull": false
402
- },
403
- "created_by": {
404
- "name": "created_by",
405
- "type": "text",
406
- "primaryKey": false,
407
- "notNull": false
408
- },
409
- "created_at": {
410
- "name": "created_at",
411
- "type": "timestamp with time zone",
412
- "primaryKey": false,
413
- "notNull": true,
414
- "default": "now()"
415
- }
416
- },
417
- "indexes": {
418
- "cms_label_versions_label_id_idx": {
419
- "name": "cms_label_versions_label_id_idx",
420
- "columns": [
421
- {
422
- "expression": "label_id",
423
- "isExpression": false,
424
- "asc": true,
425
- "nulls": "last"
426
- }
427
- ],
428
- "isUnique": false,
429
- "concurrently": false,
430
- "method": "btree",
431
- "with": {}
432
- },
433
- "cms_label_versions_status_idx": {
434
- "name": "cms_label_versions_status_idx",
435
- "columns": [
436
- {
437
- "expression": "status",
438
- "isExpression": false,
439
- "asc": true,
440
- "nulls": "last"
441
- }
442
- ],
443
- "isUnique": false,
444
- "concurrently": false,
445
- "method": "btree",
446
- "with": {}
447
- }
448
- },
449
- "foreignKeys": {
450
- "label_versions_label_id_labels_id_fk": {
451
- "name": "label_versions_label_id_labels_id_fk",
452
- "tableFrom": "label_versions",
453
- "tableTo": "labels",
454
- "schemaTo": "spfn_cms",
455
- "columnsFrom": [
456
- "label_id"
457
- ],
458
- "columnsTo": [
459
- "id"
460
- ],
461
- "onDelete": "cascade",
462
- "onUpdate": "no action"
463
- }
464
- },
465
- "compositePrimaryKeys": {},
466
- "uniqueConstraints": {
467
- "cms_label_versions_label_version_unique": {
468
- "name": "cms_label_versions_label_version_unique",
469
- "nullsNotDistinct": false,
470
- "columns": [
471
- "label_id",
472
- "version"
473
- ]
474
- }
475
- },
476
- "policies": {},
477
- "checkConstraints": {},
478
- "isRLSEnabled": false
479
- },
480
- "spfn_cms.labels": {
481
- "name": "labels",
482
- "schema": "spfn_cms",
483
- "columns": {
484
- "id": {
485
- "name": "id",
486
- "type": "serial",
487
- "primaryKey": true,
488
- "notNull": true
489
- },
490
- "key": {
491
- "name": "key",
492
- "type": "text",
493
- "primaryKey": false,
494
- "notNull": true
495
- },
496
- "section": {
497
- "name": "section",
498
- "type": "text",
499
- "primaryKey": false,
500
- "notNull": true
501
- },
502
- "type": {
503
- "name": "type",
504
- "type": "text",
505
- "primaryKey": false,
506
- "notNull": true
507
- },
508
- "default_value": {
509
- "name": "default_value",
510
- "type": "text",
511
- "primaryKey": false,
512
- "notNull": false
513
- },
514
- "description": {
515
- "name": "description",
516
- "type": "text",
517
- "primaryKey": false,
518
- "notNull": false
519
- },
520
- "published_version": {
521
- "name": "published_version",
522
- "type": "integer",
523
- "primaryKey": false,
524
- "notNull": false
525
- },
526
- "created_by": {
527
- "name": "created_by",
528
- "type": "text",
529
- "primaryKey": false,
530
- "notNull": false
531
- },
532
- "created_at": {
533
- "name": "created_at",
534
- "type": "timestamp with time zone",
535
- "primaryKey": false,
536
- "notNull": true,
537
- "default": "now()"
538
- },
539
- "updated_at": {
540
- "name": "updated_at",
541
- "type": "timestamp with time zone",
542
- "primaryKey": false,
543
- "notNull": true,
544
- "default": "now()"
545
- }
546
- },
547
- "indexes": {
548
- "cms_labels_section_idx": {
549
- "name": "cms_labels_section_idx",
550
- "columns": [
551
- {
552
- "expression": "section",
553
- "isExpression": false,
554
- "asc": true,
555
- "nulls": "last"
556
- }
557
- ],
558
- "isUnique": false,
559
- "concurrently": false,
560
- "method": "btree",
561
- "with": {}
562
- },
563
- "cms_labels_key_idx": {
564
- "name": "cms_labels_key_idx",
565
- "columns": [
566
- {
567
- "expression": "key",
568
- "isExpression": false,
569
- "asc": true,
570
- "nulls": "last"
571
- }
572
- ],
573
- "isUnique": false,
574
- "concurrently": false,
575
- "method": "btree",
576
- "with": {}
577
- }
578
- },
579
- "foreignKeys": {},
580
- "compositePrimaryKeys": {},
581
- "uniqueConstraints": {
582
- "labels_key_unique": {
583
- "name": "labels_key_unique",
584
- "nullsNotDistinct": false,
585
- "columns": [
586
- "key"
587
- ]
588
- }
589
- },
590
- "policies": {},
591
- "checkConstraints": {},
592
- "isRLSEnabled": false
593
- },
594
- "spfn_cms.published_cache": {
595
- "name": "published_cache",
596
- "schema": "spfn_cms",
597
- "columns": {
598
- "id": {
599
- "name": "id",
600
- "type": "serial",
601
- "primaryKey": true,
602
- "notNull": true
603
- },
604
- "section": {
605
- "name": "section",
606
- "type": "text",
607
- "primaryKey": false,
608
- "notNull": true
609
- },
610
- "locale": {
611
- "name": "locale",
612
- "type": "text",
613
- "primaryKey": false,
614
- "notNull": true
615
- },
616
- "content": {
617
- "name": "content",
618
- "type": "jsonb",
619
- "primaryKey": false,
620
- "notNull": true
621
- },
622
- "published_at": {
623
- "name": "published_at",
624
- "type": "timestamp with time zone",
625
- "primaryKey": false,
626
- "notNull": true
627
- },
628
- "published_by": {
629
- "name": "published_by",
630
- "type": "text",
631
- "primaryKey": false,
632
- "notNull": false
633
- },
634
- "version": {
635
- "name": "version",
636
- "type": "integer",
637
- "primaryKey": false,
638
- "notNull": true,
639
- "default": 1
640
- }
641
- },
642
- "indexes": {
643
- "cms_published_cache_section_idx": {
644
- "name": "cms_published_cache_section_idx",
645
- "columns": [
646
- {
647
- "expression": "section",
648
- "isExpression": false,
649
- "asc": true,
650
- "nulls": "last"
651
- }
652
- ],
653
- "isUnique": false,
654
- "concurrently": false,
655
- "method": "btree",
656
- "with": {}
657
- }
658
- },
659
- "foreignKeys": {},
660
- "compositePrimaryKeys": {},
661
- "uniqueConstraints": {
662
- "cms_published_cache_unique": {
663
- "name": "cms_published_cache_unique",
664
- "nullsNotDistinct": false,
665
- "columns": [
666
- "section",
667
- "locale"
668
- ]
669
- }
670
- },
671
- "policies": {},
672
- "checkConstraints": {},
673
- "isRLSEnabled": false
674
- }
675
- },
6
+ "tables": {},
676
7
  "enums": {},
677
8
  "schemas": {},
678
9
  "sequences": {},
679
- "roles": {},
680
- "policies": {},
681
- "views": {},
682
10
  "_meta": {
683
- "columns": {},
684
11
  "schemas": {},
685
- "tables": {}
12
+ "tables": {},
13
+ "columns": {}
686
14
  }
687
15
  }