@nymbalhq/platform 1.1.0 → 1.3.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 (40) hide show
  1. package/dist/chunk-2PLYK5RU.js +5861 -0
  2. package/dist/chunk-2PLYK5RU.js.map +1 -0
  3. package/dist/{chunk-PW6ILJF7.js → chunk-QN56IB4G.js} +146 -10
  4. package/dist/chunk-QN56IB4G.js.map +1 -0
  5. package/dist/db/schema/index.d.ts +3798 -2050
  6. package/dist/db/schema/index.js +1 -2
  7. package/dist/index.d.ts +423 -21
  8. package/dist/index.js +1647 -1873
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-UUQ64HZP.js +8 -0
  11. package/migrations/postgres/0008_event_correlation.sql +6 -0
  12. package/migrations/postgres/0009_settings.sql +13 -0
  13. package/migrations/postgres/0010_catch_up_index.sql +2 -0
  14. package/migrations/postgres/0011_audit_entries.sql +27 -0
  15. package/migrations/postgres/0012_event_subject.sql +27 -0
  16. package/migrations/postgres/meta/0008_snapshot.json +1625 -0
  17. package/migrations/postgres/meta/0009_snapshot.json +1705 -0
  18. package/migrations/postgres/meta/0010_snapshot.json +1732 -0
  19. package/migrations/postgres/meta/0011_snapshot.json +1887 -0
  20. package/migrations/postgres/meta/0012_snapshot.json +1926 -0
  21. package/migrations/postgres/meta/_journal.json +35 -0
  22. package/migrations/sqlite/0008_event_correlation.sql +7 -0
  23. package/migrations/sqlite/0009_settings.sql +13 -0
  24. package/migrations/sqlite/0010_catch_up_index.sql +2 -0
  25. package/migrations/sqlite/0011_audit_entries.sql +26 -0
  26. package/migrations/sqlite/0012_event_subject.sql +27 -0
  27. package/migrations/sqlite/meta/0008_snapshot.json +1485 -0
  28. package/migrations/sqlite/meta/0009_snapshot.json +1571 -0
  29. package/migrations/sqlite/meta/0010_snapshot.json +1580 -0
  30. package/migrations/sqlite/meta/0011_snapshot.json +1705 -0
  31. package/migrations/sqlite/meta/0012_snapshot.json +1728 -0
  32. package/migrations/sqlite/meta/_journal.json +35 -0
  33. package/package.json +29 -23
  34. package/dist/chunk-2GFZHF5W.js +0 -2647
  35. package/dist/chunk-2GFZHF5W.js.map +0 -1
  36. package/dist/chunk-PW6ILJF7.js.map +0 -1
  37. package/dist/chunk-PZ5AY32C.js +0 -10
  38. package/dist/register-FJA7YJV3.js +0 -8
  39. package/dist/register-FJA7YJV3.js.map +0 -1
  40. /package/dist/{chunk-PZ5AY32C.js.map → register-UUQ64HZP.js.map} +0 -0
@@ -0,0 +1,1887 @@
1
+ {
2
+ "id": "1a99de95-1eb1-457e-b3ff-6430fde566b6",
3
+ "prevId": "81418af0-ebe2-4e82-bf09-d6cf90df3ac5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.audit_entries": {
8
+ "name": "audit_entries",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "at": {
18
+ "name": "at",
19
+ "type": "timestamp with time zone",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "actor_kind": {
24
+ "name": "actor_kind",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "actor_id": {
30
+ "name": "actor_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "command": {
36
+ "name": "command",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "subjects": {
42
+ "name": "subjects",
43
+ "type": "jsonb",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "correlation_id": {
48
+ "name": "correlation_id",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "idempotency_key": {
54
+ "name": "idempotency_key",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "request_hash": {
60
+ "name": "request_hash",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "outcome": {
66
+ "name": "outcome",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": true
70
+ },
71
+ "response_status": {
72
+ "name": "response_status",
73
+ "type": "integer",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "response_body": {
78
+ "name": "response_body",
79
+ "type": "jsonb",
80
+ "primaryKey": false,
81
+ "notNull": false
82
+ }
83
+ },
84
+ "indexes": {
85
+ "audit_entries_applied_key_unique": {
86
+ "name": "audit_entries_applied_key_unique",
87
+ "columns": [
88
+ {
89
+ "expression": "actor_id",
90
+ "isExpression": false,
91
+ "asc": true,
92
+ "nulls": "last"
93
+ },
94
+ {
95
+ "expression": "command",
96
+ "isExpression": false,
97
+ "asc": true,
98
+ "nulls": "last"
99
+ },
100
+ {
101
+ "expression": "idempotency_key",
102
+ "isExpression": false,
103
+ "asc": true,
104
+ "nulls": "last"
105
+ }
106
+ ],
107
+ "isUnique": true,
108
+ "where": "\"audit_entries\".\"outcome\" = 'applied' AND \"audit_entries\".\"idempotency_key\" IS NOT NULL",
109
+ "concurrently": false,
110
+ "method": "btree",
111
+ "with": {}
112
+ },
113
+ "audit_entries_at_idx": {
114
+ "name": "audit_entries_at_idx",
115
+ "columns": [
116
+ {
117
+ "expression": "at",
118
+ "isExpression": false,
119
+ "asc": true,
120
+ "nulls": "last"
121
+ },
122
+ {
123
+ "expression": "id",
124
+ "isExpression": false,
125
+ "asc": true,
126
+ "nulls": "last"
127
+ }
128
+ ],
129
+ "isUnique": false,
130
+ "concurrently": false,
131
+ "method": "btree",
132
+ "with": {}
133
+ },
134
+ "audit_entries_correlation_idx": {
135
+ "name": "audit_entries_correlation_idx",
136
+ "columns": [
137
+ {
138
+ "expression": "correlation_id",
139
+ "isExpression": false,
140
+ "asc": true,
141
+ "nulls": "last"
142
+ }
143
+ ],
144
+ "isUnique": false,
145
+ "concurrently": false,
146
+ "method": "btree",
147
+ "with": {}
148
+ }
149
+ },
150
+ "foreignKeys": {},
151
+ "compositePrimaryKeys": {},
152
+ "uniqueConstraints": {},
153
+ "policies": {},
154
+ "checkConstraints": {
155
+ "audit_entries_outcome": {
156
+ "name": "audit_entries_outcome",
157
+ "value": "\"audit_entries\".\"outcome\" IN ('applied', 'refused', 'replayed')"
158
+ }
159
+ },
160
+ "isRLSEnabled": false
161
+ },
162
+ "public.carts": {
163
+ "name": "carts",
164
+ "schema": "",
165
+ "columns": {
166
+ "token": {
167
+ "name": "token",
168
+ "type": "text",
169
+ "primaryKey": true,
170
+ "notNull": true
171
+ },
172
+ "customer_id": {
173
+ "name": "customer_id",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": false
177
+ },
178
+ "currency": {
179
+ "name": "currency",
180
+ "type": "text",
181
+ "primaryKey": false,
182
+ "notNull": true
183
+ },
184
+ "items": {
185
+ "name": "items",
186
+ "type": "jsonb",
187
+ "primaryKey": false,
188
+ "notNull": true,
189
+ "default": "'[]'::jsonb"
190
+ },
191
+ "line_count": {
192
+ "name": "line_count",
193
+ "type": "integer",
194
+ "primaryKey": false,
195
+ "notNull": true,
196
+ "default": 0
197
+ },
198
+ "subtotal_minor": {
199
+ "name": "subtotal_minor",
200
+ "type": "integer",
201
+ "primaryKey": false,
202
+ "notNull": true,
203
+ "default": 0
204
+ },
205
+ "expires_at": {
206
+ "name": "expires_at",
207
+ "type": "timestamp with time zone",
208
+ "primaryKey": false,
209
+ "notNull": true
210
+ },
211
+ "created_at": {
212
+ "name": "created_at",
213
+ "type": "timestamp with time zone",
214
+ "primaryKey": false,
215
+ "notNull": true
216
+ },
217
+ "updated_at": {
218
+ "name": "updated_at",
219
+ "type": "timestamp with time zone",
220
+ "primaryKey": false,
221
+ "notNull": true
222
+ },
223
+ "abandoned_notified_at": {
224
+ "name": "abandoned_notified_at",
225
+ "type": "timestamp with time zone",
226
+ "primaryKey": false,
227
+ "notNull": false
228
+ }
229
+ },
230
+ "indexes": {
231
+ "carts_expires_idx": {
232
+ "name": "carts_expires_idx",
233
+ "columns": [
234
+ {
235
+ "expression": "expires_at",
236
+ "isExpression": false,
237
+ "asc": true,
238
+ "nulls": "last"
239
+ }
240
+ ],
241
+ "isUnique": false,
242
+ "concurrently": false,
243
+ "method": "btree",
244
+ "with": {}
245
+ },
246
+ "carts_updated_idx": {
247
+ "name": "carts_updated_idx",
248
+ "columns": [
249
+ {
250
+ "expression": "updated_at",
251
+ "isExpression": false,
252
+ "asc": true,
253
+ "nulls": "last"
254
+ }
255
+ ],
256
+ "isUnique": false,
257
+ "concurrently": false,
258
+ "method": "btree",
259
+ "with": {}
260
+ }
261
+ },
262
+ "foreignKeys": {},
263
+ "compositePrimaryKeys": {},
264
+ "uniqueConstraints": {},
265
+ "policies": {},
266
+ "checkConstraints": {},
267
+ "isRLSEnabled": false
268
+ },
269
+ "public.categories": {
270
+ "name": "categories",
271
+ "schema": "",
272
+ "columns": {
273
+ "id": {
274
+ "name": "id",
275
+ "type": "text",
276
+ "primaryKey": true,
277
+ "notNull": true
278
+ },
279
+ "parent_id": {
280
+ "name": "parent_id",
281
+ "type": "text",
282
+ "primaryKey": false,
283
+ "notNull": false
284
+ },
285
+ "slug": {
286
+ "name": "slug",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": true
290
+ },
291
+ "name": {
292
+ "name": "name",
293
+ "type": "text",
294
+ "primaryKey": false,
295
+ "notNull": true
296
+ },
297
+ "description": {
298
+ "name": "description",
299
+ "type": "text",
300
+ "primaryKey": false,
301
+ "notNull": true,
302
+ "default": "''"
303
+ },
304
+ "position": {
305
+ "name": "position",
306
+ "type": "integer",
307
+ "primaryKey": false,
308
+ "notNull": true,
309
+ "default": 0
310
+ },
311
+ "created_at": {
312
+ "name": "created_at",
313
+ "type": "timestamp with time zone",
314
+ "primaryKey": false,
315
+ "notNull": true
316
+ }
317
+ },
318
+ "indexes": {
319
+ "categories_slug_unique": {
320
+ "name": "categories_slug_unique",
321
+ "columns": [
322
+ {
323
+ "expression": "slug",
324
+ "isExpression": false,
325
+ "asc": true,
326
+ "nulls": "last"
327
+ }
328
+ ],
329
+ "isUnique": true,
330
+ "concurrently": false,
331
+ "method": "btree",
332
+ "with": {}
333
+ },
334
+ "categories_parent_idx": {
335
+ "name": "categories_parent_idx",
336
+ "columns": [
337
+ {
338
+ "expression": "parent_id",
339
+ "isExpression": false,
340
+ "asc": true,
341
+ "nulls": "last"
342
+ }
343
+ ],
344
+ "isUnique": false,
345
+ "concurrently": false,
346
+ "method": "btree",
347
+ "with": {}
348
+ }
349
+ },
350
+ "foreignKeys": {},
351
+ "compositePrimaryKeys": {},
352
+ "uniqueConstraints": {},
353
+ "policies": {},
354
+ "checkConstraints": {},
355
+ "isRLSEnabled": false
356
+ },
357
+ "public.customers": {
358
+ "name": "customers",
359
+ "schema": "",
360
+ "columns": {
361
+ "id": {
362
+ "name": "id",
363
+ "type": "text",
364
+ "primaryKey": true,
365
+ "notNull": true
366
+ },
367
+ "email": {
368
+ "name": "email",
369
+ "type": "text",
370
+ "primaryKey": false,
371
+ "notNull": true
372
+ },
373
+ "password_hash": {
374
+ "name": "password_hash",
375
+ "type": "text",
376
+ "primaryKey": false,
377
+ "notNull": true
378
+ },
379
+ "first_name": {
380
+ "name": "first_name",
381
+ "type": "text",
382
+ "primaryKey": false,
383
+ "notNull": true,
384
+ "default": "''"
385
+ },
386
+ "last_name": {
387
+ "name": "last_name",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": true,
391
+ "default": "''"
392
+ },
393
+ "phone": {
394
+ "name": "phone",
395
+ "type": "text",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "default": "''"
399
+ },
400
+ "addresses": {
401
+ "name": "addresses",
402
+ "type": "jsonb",
403
+ "primaryKey": false,
404
+ "notNull": true,
405
+ "default": "'[]'::jsonb"
406
+ },
407
+ "order_count": {
408
+ "name": "order_count",
409
+ "type": "integer",
410
+ "primaryKey": false,
411
+ "notNull": true,
412
+ "default": 0
413
+ },
414
+ "total_spent_minor": {
415
+ "name": "total_spent_minor",
416
+ "type": "integer",
417
+ "primaryKey": false,
418
+ "notNull": true,
419
+ "default": 0
420
+ },
421
+ "metadata": {
422
+ "name": "metadata",
423
+ "type": "jsonb",
424
+ "primaryKey": false,
425
+ "notNull": true,
426
+ "default": "'{}'::jsonb"
427
+ },
428
+ "roles": {
429
+ "name": "roles",
430
+ "type": "jsonb",
431
+ "primaryKey": false,
432
+ "notNull": true,
433
+ "default": "'[\"customer\"]'::jsonb"
434
+ },
435
+ "requires_password_reset": {
436
+ "name": "requires_password_reset",
437
+ "type": "boolean",
438
+ "primaryKey": false,
439
+ "notNull": true,
440
+ "default": false
441
+ },
442
+ "created_at": {
443
+ "name": "created_at",
444
+ "type": "timestamp with time zone",
445
+ "primaryKey": false,
446
+ "notNull": true
447
+ },
448
+ "updated_at": {
449
+ "name": "updated_at",
450
+ "type": "timestamp with time zone",
451
+ "primaryKey": false,
452
+ "notNull": true
453
+ }
454
+ },
455
+ "indexes": {
456
+ "customers_email_unique": {
457
+ "name": "customers_email_unique",
458
+ "columns": [
459
+ {
460
+ "expression": "email",
461
+ "isExpression": false,
462
+ "asc": true,
463
+ "nulls": "last"
464
+ }
465
+ ],
466
+ "isUnique": true,
467
+ "concurrently": false,
468
+ "method": "btree",
469
+ "with": {}
470
+ }
471
+ },
472
+ "foreignKeys": {},
473
+ "compositePrimaryKeys": {},
474
+ "uniqueConstraints": {},
475
+ "policies": {},
476
+ "checkConstraints": {},
477
+ "isRLSEnabled": false
478
+ },
479
+ "public.events": {
480
+ "name": "events",
481
+ "schema": "",
482
+ "columns": {
483
+ "seq": {
484
+ "name": "seq",
485
+ "type": "bigserial",
486
+ "primaryKey": true,
487
+ "notNull": true
488
+ },
489
+ "id": {
490
+ "name": "id",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": true
494
+ },
495
+ "type": {
496
+ "name": "type",
497
+ "type": "text",
498
+ "primaryKey": false,
499
+ "notNull": true
500
+ },
501
+ "envelope": {
502
+ "name": "envelope",
503
+ "type": "jsonb",
504
+ "primaryKey": false,
505
+ "notNull": true
506
+ },
507
+ "correlation_id": {
508
+ "name": "correlation_id",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": true
512
+ },
513
+ "created_at": {
514
+ "name": "created_at",
515
+ "type": "timestamp with time zone",
516
+ "primaryKey": false,
517
+ "notNull": true
518
+ },
519
+ "delivered_at": {
520
+ "name": "delivered_at",
521
+ "type": "timestamp with time zone",
522
+ "primaryKey": false,
523
+ "notNull": false
524
+ },
525
+ "attempts": {
526
+ "name": "attempts",
527
+ "type": "integer",
528
+ "primaryKey": false,
529
+ "notNull": true,
530
+ "default": 0
531
+ },
532
+ "dead_at": {
533
+ "name": "dead_at",
534
+ "type": "timestamp with time zone",
535
+ "primaryKey": false,
536
+ "notNull": false
537
+ }
538
+ },
539
+ "indexes": {
540
+ "events_id_unique": {
541
+ "name": "events_id_unique",
542
+ "columns": [
543
+ {
544
+ "expression": "id",
545
+ "isExpression": false,
546
+ "asc": true,
547
+ "nulls": "last"
548
+ }
549
+ ],
550
+ "isUnique": true,
551
+ "concurrently": false,
552
+ "method": "btree",
553
+ "with": {}
554
+ },
555
+ "events_undelivered_idx": {
556
+ "name": "events_undelivered_idx",
557
+ "columns": [
558
+ {
559
+ "expression": "delivered_at",
560
+ "isExpression": false,
561
+ "asc": true,
562
+ "nulls": "last"
563
+ },
564
+ {
565
+ "expression": "seq",
566
+ "isExpression": false,
567
+ "asc": true,
568
+ "nulls": "last"
569
+ }
570
+ ],
571
+ "isUnique": false,
572
+ "concurrently": false,
573
+ "method": "btree",
574
+ "with": {}
575
+ },
576
+ "events_correlation_idx": {
577
+ "name": "events_correlation_idx",
578
+ "columns": [
579
+ {
580
+ "expression": "correlation_id",
581
+ "isExpression": false,
582
+ "asc": true,
583
+ "nulls": "last"
584
+ },
585
+ {
586
+ "expression": "seq",
587
+ "isExpression": false,
588
+ "asc": true,
589
+ "nulls": "last"
590
+ }
591
+ ],
592
+ "isUnique": false,
593
+ "concurrently": false,
594
+ "method": "btree",
595
+ "with": {}
596
+ },
597
+ "events_catch_up_idx": {
598
+ "name": "events_catch_up_idx",
599
+ "columns": [
600
+ {
601
+ "expression": "dead_at",
602
+ "isExpression": false,
603
+ "asc": true,
604
+ "nulls": "last"
605
+ },
606
+ {
607
+ "expression": "delivered_at",
608
+ "isExpression": false,
609
+ "asc": true,
610
+ "nulls": "last"
611
+ },
612
+ {
613
+ "expression": "seq",
614
+ "isExpression": false,
615
+ "asc": true,
616
+ "nulls": "last"
617
+ }
618
+ ],
619
+ "isUnique": false,
620
+ "concurrently": false,
621
+ "method": "btree",
622
+ "with": {}
623
+ }
624
+ },
625
+ "foreignKeys": {},
626
+ "compositePrimaryKeys": {},
627
+ "uniqueConstraints": {},
628
+ "policies": {},
629
+ "checkConstraints": {},
630
+ "isRLSEnabled": false
631
+ },
632
+ "public.inventory_reservations": {
633
+ "name": "inventory_reservations",
634
+ "schema": "",
635
+ "columns": {
636
+ "reservation_id": {
637
+ "name": "reservation_id",
638
+ "type": "text",
639
+ "primaryKey": true,
640
+ "notNull": true
641
+ },
642
+ "variant_id": {
643
+ "name": "variant_id",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": true
647
+ },
648
+ "qty": {
649
+ "name": "qty",
650
+ "type": "integer",
651
+ "primaryKey": false,
652
+ "notNull": true
653
+ },
654
+ "order_ref": {
655
+ "name": "order_ref",
656
+ "type": "text",
657
+ "primaryKey": false,
658
+ "notNull": false
659
+ },
660
+ "expires_at": {
661
+ "name": "expires_at",
662
+ "type": "timestamp with time zone",
663
+ "primaryKey": false,
664
+ "notNull": true
665
+ },
666
+ "created_at": {
667
+ "name": "created_at",
668
+ "type": "timestamp with time zone",
669
+ "primaryKey": false,
670
+ "notNull": true
671
+ }
672
+ },
673
+ "indexes": {
674
+ "inv_reservations_variant_idx": {
675
+ "name": "inv_reservations_variant_idx",
676
+ "columns": [
677
+ {
678
+ "expression": "variant_id",
679
+ "isExpression": false,
680
+ "asc": true,
681
+ "nulls": "last"
682
+ }
683
+ ],
684
+ "isUnique": false,
685
+ "concurrently": false,
686
+ "method": "btree",
687
+ "with": {}
688
+ },
689
+ "inv_reservations_expires_idx": {
690
+ "name": "inv_reservations_expires_idx",
691
+ "columns": [
692
+ {
693
+ "expression": "expires_at",
694
+ "isExpression": false,
695
+ "asc": true,
696
+ "nulls": "last"
697
+ }
698
+ ],
699
+ "isUnique": false,
700
+ "concurrently": false,
701
+ "method": "btree",
702
+ "with": {}
703
+ }
704
+ },
705
+ "foreignKeys": {},
706
+ "compositePrimaryKeys": {},
707
+ "uniqueConstraints": {},
708
+ "policies": {},
709
+ "checkConstraints": {},
710
+ "isRLSEnabled": false
711
+ },
712
+ "public.order_history": {
713
+ "name": "order_history",
714
+ "schema": "",
715
+ "columns": {
716
+ "id": {
717
+ "name": "id",
718
+ "type": "text",
719
+ "primaryKey": true,
720
+ "notNull": true
721
+ },
722
+ "order_id": {
723
+ "name": "order_id",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true
727
+ },
728
+ "from_status": {
729
+ "name": "from_status",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": false
733
+ },
734
+ "to_status": {
735
+ "name": "to_status",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true
739
+ },
740
+ "actor": {
741
+ "name": "actor",
742
+ "type": "text",
743
+ "primaryKey": false,
744
+ "notNull": true
745
+ },
746
+ "note": {
747
+ "name": "note",
748
+ "type": "text",
749
+ "primaryKey": false,
750
+ "notNull": true,
751
+ "default": "''"
752
+ },
753
+ "timestamp": {
754
+ "name": "timestamp",
755
+ "type": "timestamp with time zone",
756
+ "primaryKey": false,
757
+ "notNull": true
758
+ }
759
+ },
760
+ "indexes": {
761
+ "order_history_order_idx": {
762
+ "name": "order_history_order_idx",
763
+ "columns": [
764
+ {
765
+ "expression": "order_id",
766
+ "isExpression": false,
767
+ "asc": true,
768
+ "nulls": "last"
769
+ }
770
+ ],
771
+ "isUnique": false,
772
+ "concurrently": false,
773
+ "method": "btree",
774
+ "with": {}
775
+ }
776
+ },
777
+ "foreignKeys": {},
778
+ "compositePrimaryKeys": {},
779
+ "uniqueConstraints": {},
780
+ "policies": {},
781
+ "checkConstraints": {},
782
+ "isRLSEnabled": false
783
+ },
784
+ "public.order_refunds": {
785
+ "name": "order_refunds",
786
+ "schema": "",
787
+ "columns": {
788
+ "id": {
789
+ "name": "id",
790
+ "type": "text",
791
+ "primaryKey": true,
792
+ "notNull": true
793
+ },
794
+ "order_id": {
795
+ "name": "order_id",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true
799
+ },
800
+ "amount_minor": {
801
+ "name": "amount_minor",
802
+ "type": "integer",
803
+ "primaryKey": false,
804
+ "notNull": true
805
+ },
806
+ "currency": {
807
+ "name": "currency",
808
+ "type": "text",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ },
812
+ "provider_refund_id": {
813
+ "name": "provider_refund_id",
814
+ "type": "text",
815
+ "primaryKey": false,
816
+ "notNull": false
817
+ },
818
+ "status": {
819
+ "name": "status",
820
+ "type": "text",
821
+ "primaryKey": false,
822
+ "notNull": true,
823
+ "default": "'pending'"
824
+ },
825
+ "reason": {
826
+ "name": "reason",
827
+ "type": "text",
828
+ "primaryKey": false,
829
+ "notNull": false
830
+ },
831
+ "actor": {
832
+ "name": "actor",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true
836
+ },
837
+ "created_at": {
838
+ "name": "created_at",
839
+ "type": "timestamp with time zone",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "request_id": {
844
+ "name": "request_id",
845
+ "type": "text",
846
+ "primaryKey": false,
847
+ "notNull": false
848
+ }
849
+ },
850
+ "indexes": {
851
+ "order_refunds_order_idx": {
852
+ "name": "order_refunds_order_idx",
853
+ "columns": [
854
+ {
855
+ "expression": "order_id",
856
+ "isExpression": false,
857
+ "asc": true,
858
+ "nulls": "last"
859
+ }
860
+ ],
861
+ "isUnique": false,
862
+ "concurrently": false,
863
+ "method": "btree",
864
+ "with": {}
865
+ },
866
+ "order_refunds_order_request_idx": {
867
+ "name": "order_refunds_order_request_idx",
868
+ "columns": [
869
+ {
870
+ "expression": "order_id",
871
+ "isExpression": false,
872
+ "asc": true,
873
+ "nulls": "last"
874
+ },
875
+ {
876
+ "expression": "request_id",
877
+ "isExpression": false,
878
+ "asc": true,
879
+ "nulls": "last"
880
+ }
881
+ ],
882
+ "isUnique": true,
883
+ "concurrently": false,
884
+ "method": "btree",
885
+ "with": {}
886
+ }
887
+ },
888
+ "foreignKeys": {},
889
+ "compositePrimaryKeys": {},
890
+ "uniqueConstraints": {},
891
+ "policies": {},
892
+ "checkConstraints": {},
893
+ "isRLSEnabled": false
894
+ },
895
+ "public.order_sequences": {
896
+ "name": "order_sequences",
897
+ "schema": "",
898
+ "columns": {
899
+ "id": {
900
+ "name": "id",
901
+ "type": "integer",
902
+ "primaryKey": true,
903
+ "notNull": true
904
+ },
905
+ "next_value": {
906
+ "name": "next_value",
907
+ "type": "integer",
908
+ "primaryKey": false,
909
+ "notNull": true
910
+ }
911
+ },
912
+ "indexes": {},
913
+ "foreignKeys": {},
914
+ "compositePrimaryKeys": {},
915
+ "uniqueConstraints": {},
916
+ "policies": {},
917
+ "checkConstraints": {},
918
+ "isRLSEnabled": false
919
+ },
920
+ "public.orders": {
921
+ "name": "orders",
922
+ "schema": "",
923
+ "columns": {
924
+ "id": {
925
+ "name": "id",
926
+ "type": "text",
927
+ "primaryKey": true,
928
+ "notNull": true
929
+ },
930
+ "order_number": {
931
+ "name": "order_number",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true
935
+ },
936
+ "sequence": {
937
+ "name": "sequence",
938
+ "type": "integer",
939
+ "primaryKey": false,
940
+ "notNull": true
941
+ },
942
+ "customer_id": {
943
+ "name": "customer_id",
944
+ "type": "text",
945
+ "primaryKey": false,
946
+ "notNull": false
947
+ },
948
+ "status": {
949
+ "name": "status",
950
+ "type": "text",
951
+ "primaryKey": false,
952
+ "notNull": true,
953
+ "default": "'pending'"
954
+ },
955
+ "email": {
956
+ "name": "email",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": true
960
+ },
961
+ "billing_address": {
962
+ "name": "billing_address",
963
+ "type": "jsonb",
964
+ "primaryKey": false,
965
+ "notNull": true
966
+ },
967
+ "shipping_address": {
968
+ "name": "shipping_address",
969
+ "type": "jsonb",
970
+ "primaryKey": false,
971
+ "notNull": true
972
+ },
973
+ "line_items": {
974
+ "name": "line_items",
975
+ "type": "jsonb",
976
+ "primaryKey": false,
977
+ "notNull": true
978
+ },
979
+ "subtotal_minor": {
980
+ "name": "subtotal_minor",
981
+ "type": "integer",
982
+ "primaryKey": false,
983
+ "notNull": true
984
+ },
985
+ "tax_total_minor": {
986
+ "name": "tax_total_minor",
987
+ "type": "integer",
988
+ "primaryKey": false,
989
+ "notNull": true,
990
+ "default": 0
991
+ },
992
+ "shipping_total_minor": {
993
+ "name": "shipping_total_minor",
994
+ "type": "integer",
995
+ "primaryKey": false,
996
+ "notNull": true,
997
+ "default": 0
998
+ },
999
+ "discount_total_minor": {
1000
+ "name": "discount_total_minor",
1001
+ "type": "integer",
1002
+ "primaryKey": false,
1003
+ "notNull": true,
1004
+ "default": 0
1005
+ },
1006
+ "total_minor": {
1007
+ "name": "total_minor",
1008
+ "type": "integer",
1009
+ "primaryKey": false,
1010
+ "notNull": true
1011
+ },
1012
+ "currency": {
1013
+ "name": "currency",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": true
1017
+ },
1018
+ "notes": {
1019
+ "name": "notes",
1020
+ "type": "text",
1021
+ "primaryKey": false,
1022
+ "notNull": true,
1023
+ "default": "''"
1024
+ },
1025
+ "metadata": {
1026
+ "name": "metadata",
1027
+ "type": "jsonb",
1028
+ "primaryKey": false,
1029
+ "notNull": true,
1030
+ "default": "'{}'::jsonb"
1031
+ },
1032
+ "payment_intent_id": {
1033
+ "name": "payment_intent_id",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": false
1037
+ },
1038
+ "cart_token": {
1039
+ "name": "cart_token",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": false
1043
+ },
1044
+ "captured_minor": {
1045
+ "name": "captured_minor",
1046
+ "type": "integer",
1047
+ "primaryKey": false,
1048
+ "notNull": true,
1049
+ "default": 0
1050
+ },
1051
+ "captured_at": {
1052
+ "name": "captured_at",
1053
+ "type": "timestamp with time zone",
1054
+ "primaryKey": false,
1055
+ "notNull": false
1056
+ },
1057
+ "refunded_minor": {
1058
+ "name": "refunded_minor",
1059
+ "type": "integer",
1060
+ "primaryKey": false,
1061
+ "notNull": true,
1062
+ "default": 0
1063
+ },
1064
+ "capture_method": {
1065
+ "name": "capture_method",
1066
+ "type": "text",
1067
+ "primaryKey": false,
1068
+ "notNull": false
1069
+ },
1070
+ "created_at": {
1071
+ "name": "created_at",
1072
+ "type": "timestamp with time zone",
1073
+ "primaryKey": false,
1074
+ "notNull": true
1075
+ },
1076
+ "updated_at": {
1077
+ "name": "updated_at",
1078
+ "type": "timestamp with time zone",
1079
+ "primaryKey": false,
1080
+ "notNull": true
1081
+ }
1082
+ },
1083
+ "indexes": {
1084
+ "orders_number_unique": {
1085
+ "name": "orders_number_unique",
1086
+ "columns": [
1087
+ {
1088
+ "expression": "order_number",
1089
+ "isExpression": false,
1090
+ "asc": true,
1091
+ "nulls": "last"
1092
+ }
1093
+ ],
1094
+ "isUnique": true,
1095
+ "concurrently": false,
1096
+ "method": "btree",
1097
+ "with": {}
1098
+ },
1099
+ "orders_sequence_unique": {
1100
+ "name": "orders_sequence_unique",
1101
+ "columns": [
1102
+ {
1103
+ "expression": "sequence",
1104
+ "isExpression": false,
1105
+ "asc": true,
1106
+ "nulls": "last"
1107
+ }
1108
+ ],
1109
+ "isUnique": true,
1110
+ "concurrently": false,
1111
+ "method": "btree",
1112
+ "with": {}
1113
+ },
1114
+ "orders_customer_idx": {
1115
+ "name": "orders_customer_idx",
1116
+ "columns": [
1117
+ {
1118
+ "expression": "customer_id",
1119
+ "isExpression": false,
1120
+ "asc": true,
1121
+ "nulls": "last"
1122
+ }
1123
+ ],
1124
+ "isUnique": false,
1125
+ "concurrently": false,
1126
+ "method": "btree",
1127
+ "with": {}
1128
+ },
1129
+ "orders_status_idx": {
1130
+ "name": "orders_status_idx",
1131
+ "columns": [
1132
+ {
1133
+ "expression": "status",
1134
+ "isExpression": false,
1135
+ "asc": true,
1136
+ "nulls": "last"
1137
+ }
1138
+ ],
1139
+ "isUnique": false,
1140
+ "concurrently": false,
1141
+ "method": "btree",
1142
+ "with": {}
1143
+ },
1144
+ "orders_payment_intent_idx": {
1145
+ "name": "orders_payment_intent_idx",
1146
+ "columns": [
1147
+ {
1148
+ "expression": "payment_intent_id",
1149
+ "isExpression": false,
1150
+ "asc": true,
1151
+ "nulls": "last"
1152
+ }
1153
+ ],
1154
+ "isUnique": false,
1155
+ "concurrently": false,
1156
+ "method": "btree",
1157
+ "with": {}
1158
+ },
1159
+ "orders_pending_cart_unique": {
1160
+ "name": "orders_pending_cart_unique",
1161
+ "columns": [
1162
+ {
1163
+ "expression": "cart_token",
1164
+ "isExpression": false,
1165
+ "asc": true,
1166
+ "nulls": "last"
1167
+ }
1168
+ ],
1169
+ "isUnique": true,
1170
+ "where": "status = 'pending'",
1171
+ "concurrently": false,
1172
+ "method": "btree",
1173
+ "with": {}
1174
+ }
1175
+ },
1176
+ "foreignKeys": {},
1177
+ "compositePrimaryKeys": {},
1178
+ "uniqueConstraints": {},
1179
+ "policies": {},
1180
+ "checkConstraints": {},
1181
+ "isRLSEnabled": false
1182
+ },
1183
+ "public.processed_events": {
1184
+ "name": "processed_events",
1185
+ "schema": "",
1186
+ "columns": {
1187
+ "handler_name": {
1188
+ "name": "handler_name",
1189
+ "type": "text",
1190
+ "primaryKey": false,
1191
+ "notNull": true
1192
+ },
1193
+ "event_id": {
1194
+ "name": "event_id",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": true
1198
+ },
1199
+ "processed_at": {
1200
+ "name": "processed_at",
1201
+ "type": "timestamp with time zone",
1202
+ "primaryKey": false,
1203
+ "notNull": true
1204
+ }
1205
+ },
1206
+ "indexes": {},
1207
+ "foreignKeys": {},
1208
+ "compositePrimaryKeys": {
1209
+ "processed_events_handler_name_event_id_pk": {
1210
+ "name": "processed_events_handler_name_event_id_pk",
1211
+ "columns": [
1212
+ "handler_name",
1213
+ "event_id"
1214
+ ]
1215
+ }
1216
+ },
1217
+ "uniqueConstraints": {},
1218
+ "policies": {},
1219
+ "checkConstraints": {},
1220
+ "isRLSEnabled": false
1221
+ },
1222
+ "public.product_categories": {
1223
+ "name": "product_categories",
1224
+ "schema": "",
1225
+ "columns": {
1226
+ "product_id": {
1227
+ "name": "product_id",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true
1231
+ },
1232
+ "category_id": {
1233
+ "name": "category_id",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": true
1237
+ }
1238
+ },
1239
+ "indexes": {
1240
+ "product_categories_category_idx": {
1241
+ "name": "product_categories_category_idx",
1242
+ "columns": [
1243
+ {
1244
+ "expression": "category_id",
1245
+ "isExpression": false,
1246
+ "asc": true,
1247
+ "nulls": "last"
1248
+ }
1249
+ ],
1250
+ "isUnique": false,
1251
+ "concurrently": false,
1252
+ "method": "btree",
1253
+ "with": {}
1254
+ }
1255
+ },
1256
+ "foreignKeys": {},
1257
+ "compositePrimaryKeys": {
1258
+ "product_categories_product_id_category_id_pk": {
1259
+ "name": "product_categories_product_id_category_id_pk",
1260
+ "columns": [
1261
+ "product_id",
1262
+ "category_id"
1263
+ ]
1264
+ }
1265
+ },
1266
+ "uniqueConstraints": {},
1267
+ "policies": {},
1268
+ "checkConstraints": {},
1269
+ "isRLSEnabled": false
1270
+ },
1271
+ "public.products": {
1272
+ "name": "products",
1273
+ "schema": "",
1274
+ "columns": {
1275
+ "id": {
1276
+ "name": "id",
1277
+ "type": "text",
1278
+ "primaryKey": true,
1279
+ "notNull": true
1280
+ },
1281
+ "slug": {
1282
+ "name": "slug",
1283
+ "type": "text",
1284
+ "primaryKey": false,
1285
+ "notNull": true
1286
+ },
1287
+ "name": {
1288
+ "name": "name",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": true
1292
+ },
1293
+ "description": {
1294
+ "name": "description",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": true,
1298
+ "default": "''"
1299
+ },
1300
+ "short_description": {
1301
+ "name": "short_description",
1302
+ "type": "text",
1303
+ "primaryKey": false,
1304
+ "notNull": true,
1305
+ "default": "''"
1306
+ },
1307
+ "status": {
1308
+ "name": "status",
1309
+ "type": "text",
1310
+ "primaryKey": false,
1311
+ "notNull": true,
1312
+ "default": "'draft'"
1313
+ },
1314
+ "type": {
1315
+ "name": "type",
1316
+ "type": "text",
1317
+ "primaryKey": false,
1318
+ "notNull": true,
1319
+ "default": "'simple'"
1320
+ },
1321
+ "seo_title": {
1322
+ "name": "seo_title",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": true,
1326
+ "default": "''"
1327
+ },
1328
+ "seo_description": {
1329
+ "name": "seo_description",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": true,
1333
+ "default": "''"
1334
+ },
1335
+ "media": {
1336
+ "name": "media",
1337
+ "type": "jsonb",
1338
+ "primaryKey": false,
1339
+ "notNull": true,
1340
+ "default": "'[]'::jsonb"
1341
+ },
1342
+ "metadata": {
1343
+ "name": "metadata",
1344
+ "type": "jsonb",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "default": "'{}'::jsonb"
1348
+ },
1349
+ "created_at": {
1350
+ "name": "created_at",
1351
+ "type": "timestamp with time zone",
1352
+ "primaryKey": false,
1353
+ "notNull": true
1354
+ },
1355
+ "updated_at": {
1356
+ "name": "updated_at",
1357
+ "type": "timestamp with time zone",
1358
+ "primaryKey": false,
1359
+ "notNull": true
1360
+ }
1361
+ },
1362
+ "indexes": {
1363
+ "products_slug_unique": {
1364
+ "name": "products_slug_unique",
1365
+ "columns": [
1366
+ {
1367
+ "expression": "slug",
1368
+ "isExpression": false,
1369
+ "asc": true,
1370
+ "nulls": "last"
1371
+ }
1372
+ ],
1373
+ "isUnique": true,
1374
+ "concurrently": false,
1375
+ "method": "btree",
1376
+ "with": {}
1377
+ },
1378
+ "products_status_idx": {
1379
+ "name": "products_status_idx",
1380
+ "columns": [
1381
+ {
1382
+ "expression": "status",
1383
+ "isExpression": false,
1384
+ "asc": true,
1385
+ "nulls": "last"
1386
+ }
1387
+ ],
1388
+ "isUnique": false,
1389
+ "concurrently": false,
1390
+ "method": "btree",
1391
+ "with": {}
1392
+ }
1393
+ },
1394
+ "foreignKeys": {},
1395
+ "compositePrimaryKeys": {},
1396
+ "uniqueConstraints": {},
1397
+ "policies": {},
1398
+ "checkConstraints": {},
1399
+ "isRLSEnabled": false
1400
+ },
1401
+ "public.refresh_tokens": {
1402
+ "name": "refresh_tokens",
1403
+ "schema": "",
1404
+ "columns": {
1405
+ "id": {
1406
+ "name": "id",
1407
+ "type": "text",
1408
+ "primaryKey": true,
1409
+ "notNull": true
1410
+ },
1411
+ "customer_id": {
1412
+ "name": "customer_id",
1413
+ "type": "text",
1414
+ "primaryKey": false,
1415
+ "notNull": true
1416
+ },
1417
+ "token_hash": {
1418
+ "name": "token_hash",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": true
1422
+ },
1423
+ "revoked_at": {
1424
+ "name": "revoked_at",
1425
+ "type": "timestamp with time zone",
1426
+ "primaryKey": false,
1427
+ "notNull": false
1428
+ },
1429
+ "replaced_by_jti": {
1430
+ "name": "replaced_by_jti",
1431
+ "type": "text",
1432
+ "primaryKey": false,
1433
+ "notNull": false
1434
+ },
1435
+ "expires_at": {
1436
+ "name": "expires_at",
1437
+ "type": "timestamp with time zone",
1438
+ "primaryKey": false,
1439
+ "notNull": true
1440
+ },
1441
+ "created_at": {
1442
+ "name": "created_at",
1443
+ "type": "timestamp with time zone",
1444
+ "primaryKey": false,
1445
+ "notNull": true
1446
+ }
1447
+ },
1448
+ "indexes": {
1449
+ "refresh_tokens_customer_idx": {
1450
+ "name": "refresh_tokens_customer_idx",
1451
+ "columns": [
1452
+ {
1453
+ "expression": "customer_id",
1454
+ "isExpression": false,
1455
+ "asc": true,
1456
+ "nulls": "last"
1457
+ }
1458
+ ],
1459
+ "isUnique": false,
1460
+ "concurrently": false,
1461
+ "method": "btree",
1462
+ "with": {}
1463
+ }
1464
+ },
1465
+ "foreignKeys": {},
1466
+ "compositePrimaryKeys": {},
1467
+ "uniqueConstraints": {},
1468
+ "policies": {},
1469
+ "checkConstraints": {},
1470
+ "isRLSEnabled": false
1471
+ },
1472
+ "public.reviews": {
1473
+ "name": "reviews",
1474
+ "schema": "",
1475
+ "columns": {
1476
+ "id": {
1477
+ "name": "id",
1478
+ "type": "text",
1479
+ "primaryKey": true,
1480
+ "notNull": true
1481
+ },
1482
+ "product_id": {
1483
+ "name": "product_id",
1484
+ "type": "text",
1485
+ "primaryKey": false,
1486
+ "notNull": true
1487
+ },
1488
+ "customer_id": {
1489
+ "name": "customer_id",
1490
+ "type": "text",
1491
+ "primaryKey": false,
1492
+ "notNull": false
1493
+ },
1494
+ "order_id": {
1495
+ "name": "order_id",
1496
+ "type": "text",
1497
+ "primaryKey": false,
1498
+ "notNull": false
1499
+ },
1500
+ "rating": {
1501
+ "name": "rating",
1502
+ "type": "integer",
1503
+ "primaryKey": false,
1504
+ "notNull": true
1505
+ },
1506
+ "title": {
1507
+ "name": "title",
1508
+ "type": "text",
1509
+ "primaryKey": false,
1510
+ "notNull": true,
1511
+ "default": "''"
1512
+ },
1513
+ "body": {
1514
+ "name": "body",
1515
+ "type": "text",
1516
+ "primaryKey": false,
1517
+ "notNull": true,
1518
+ "default": "''"
1519
+ },
1520
+ "moderation_status": {
1521
+ "name": "moderation_status",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": true,
1525
+ "default": "'pending'"
1526
+ },
1527
+ "submitted_at": {
1528
+ "name": "submitted_at",
1529
+ "type": "timestamp with time zone",
1530
+ "primaryKey": false,
1531
+ "notNull": true
1532
+ },
1533
+ "moderated_at": {
1534
+ "name": "moderated_at",
1535
+ "type": "timestamp with time zone",
1536
+ "primaryKey": false,
1537
+ "notNull": false
1538
+ },
1539
+ "moderated_by": {
1540
+ "name": "moderated_by",
1541
+ "type": "text",
1542
+ "primaryKey": false,
1543
+ "notNull": false
1544
+ }
1545
+ },
1546
+ "indexes": {
1547
+ "reviews_product_idx": {
1548
+ "name": "reviews_product_idx",
1549
+ "columns": [
1550
+ {
1551
+ "expression": "product_id",
1552
+ "isExpression": false,
1553
+ "asc": true,
1554
+ "nulls": "last"
1555
+ }
1556
+ ],
1557
+ "isUnique": false,
1558
+ "concurrently": false,
1559
+ "method": "btree",
1560
+ "with": {}
1561
+ },
1562
+ "reviews_status_idx": {
1563
+ "name": "reviews_status_idx",
1564
+ "columns": [
1565
+ {
1566
+ "expression": "moderation_status",
1567
+ "isExpression": false,
1568
+ "asc": true,
1569
+ "nulls": "last"
1570
+ }
1571
+ ],
1572
+ "isUnique": false,
1573
+ "concurrently": false,
1574
+ "method": "btree",
1575
+ "with": {}
1576
+ }
1577
+ },
1578
+ "foreignKeys": {},
1579
+ "compositePrimaryKeys": {},
1580
+ "uniqueConstraints": {},
1581
+ "policies": {},
1582
+ "checkConstraints": {},
1583
+ "isRLSEnabled": false
1584
+ },
1585
+ "public.settings": {
1586
+ "name": "settings",
1587
+ "schema": "",
1588
+ "columns": {
1589
+ "slot": {
1590
+ "name": "slot",
1591
+ "type": "text",
1592
+ "primaryKey": false,
1593
+ "notNull": true
1594
+ },
1595
+ "path": {
1596
+ "name": "path",
1597
+ "type": "text",
1598
+ "primaryKey": false,
1599
+ "notNull": true
1600
+ },
1601
+ "ciphertext": {
1602
+ "name": "ciphertext",
1603
+ "type": "bytea",
1604
+ "primaryKey": false,
1605
+ "notNull": false
1606
+ },
1607
+ "plain": {
1608
+ "name": "plain",
1609
+ "type": "text",
1610
+ "primaryKey": false,
1611
+ "notNull": false
1612
+ },
1613
+ "iv": {
1614
+ "name": "iv",
1615
+ "type": "bytea",
1616
+ "primaryKey": false,
1617
+ "notNull": false
1618
+ },
1619
+ "tag": {
1620
+ "name": "tag",
1621
+ "type": "bytea",
1622
+ "primaryKey": false,
1623
+ "notNull": false
1624
+ },
1625
+ "key_id": {
1626
+ "name": "key_id",
1627
+ "type": "text",
1628
+ "primaryKey": false,
1629
+ "notNull": false
1630
+ },
1631
+ "updated_at": {
1632
+ "name": "updated_at",
1633
+ "type": "timestamp with time zone",
1634
+ "primaryKey": false,
1635
+ "notNull": true
1636
+ },
1637
+ "updated_by": {
1638
+ "name": "updated_by",
1639
+ "type": "text",
1640
+ "primaryKey": false,
1641
+ "notNull": false
1642
+ }
1643
+ },
1644
+ "indexes": {},
1645
+ "foreignKeys": {},
1646
+ "compositePrimaryKeys": {
1647
+ "settings_slot_path_pk": {
1648
+ "name": "settings_slot_path_pk",
1649
+ "columns": [
1650
+ "slot",
1651
+ "path"
1652
+ ]
1653
+ }
1654
+ },
1655
+ "uniqueConstraints": {},
1656
+ "policies": {},
1657
+ "checkConstraints": {
1658
+ "settings_one_value": {
1659
+ "name": "settings_one_value",
1660
+ "value": "(\"settings\".\"ciphertext\" IS NULL) <> (\"settings\".\"plain\" IS NULL) AND (\"settings\".\"ciphertext\" IS NULL OR (\"settings\".\"iv\" IS NOT NULL AND \"settings\".\"tag\" IS NOT NULL AND \"settings\".\"key_id\" IS NOT NULL))"
1661
+ }
1662
+ },
1663
+ "isRLSEnabled": false
1664
+ },
1665
+ "public.stock_adjustments": {
1666
+ "name": "stock_adjustments",
1667
+ "schema": "",
1668
+ "columns": {
1669
+ "id": {
1670
+ "name": "id",
1671
+ "type": "text",
1672
+ "primaryKey": true,
1673
+ "notNull": true
1674
+ },
1675
+ "variant_id": {
1676
+ "name": "variant_id",
1677
+ "type": "text",
1678
+ "primaryKey": false,
1679
+ "notNull": true
1680
+ },
1681
+ "adjustment": {
1682
+ "name": "adjustment",
1683
+ "type": "integer",
1684
+ "primaryKey": false,
1685
+ "notNull": true
1686
+ },
1687
+ "reason": {
1688
+ "name": "reason",
1689
+ "type": "text",
1690
+ "primaryKey": false,
1691
+ "notNull": true
1692
+ },
1693
+ "actor": {
1694
+ "name": "actor",
1695
+ "type": "text",
1696
+ "primaryKey": false,
1697
+ "notNull": true
1698
+ },
1699
+ "previous_qty": {
1700
+ "name": "previous_qty",
1701
+ "type": "integer",
1702
+ "primaryKey": false,
1703
+ "notNull": true
1704
+ },
1705
+ "new_qty": {
1706
+ "name": "new_qty",
1707
+ "type": "integer",
1708
+ "primaryKey": false,
1709
+ "notNull": true
1710
+ },
1711
+ "timestamp": {
1712
+ "name": "timestamp",
1713
+ "type": "timestamp with time zone",
1714
+ "primaryKey": false,
1715
+ "notNull": true
1716
+ }
1717
+ },
1718
+ "indexes": {
1719
+ "stock_adjustments_variant_idx": {
1720
+ "name": "stock_adjustments_variant_idx",
1721
+ "columns": [
1722
+ {
1723
+ "expression": "variant_id",
1724
+ "isExpression": false,
1725
+ "asc": true,
1726
+ "nulls": "last"
1727
+ }
1728
+ ],
1729
+ "isUnique": false,
1730
+ "concurrently": false,
1731
+ "method": "btree",
1732
+ "with": {}
1733
+ }
1734
+ },
1735
+ "foreignKeys": {},
1736
+ "compositePrimaryKeys": {},
1737
+ "uniqueConstraints": {},
1738
+ "policies": {},
1739
+ "checkConstraints": {},
1740
+ "isRLSEnabled": false
1741
+ },
1742
+ "public.variants": {
1743
+ "name": "variants",
1744
+ "schema": "",
1745
+ "columns": {
1746
+ "id": {
1747
+ "name": "id",
1748
+ "type": "text",
1749
+ "primaryKey": true,
1750
+ "notNull": true
1751
+ },
1752
+ "product_id": {
1753
+ "name": "product_id",
1754
+ "type": "text",
1755
+ "primaryKey": false,
1756
+ "notNull": true
1757
+ },
1758
+ "sku": {
1759
+ "name": "sku",
1760
+ "type": "text",
1761
+ "primaryKey": false,
1762
+ "notNull": true
1763
+ },
1764
+ "name": {
1765
+ "name": "name",
1766
+ "type": "text",
1767
+ "primaryKey": false,
1768
+ "notNull": true,
1769
+ "default": "''"
1770
+ },
1771
+ "price_minor": {
1772
+ "name": "price_minor",
1773
+ "type": "integer",
1774
+ "primaryKey": false,
1775
+ "notNull": true
1776
+ },
1777
+ "compare_at_price_minor": {
1778
+ "name": "compare_at_price_minor",
1779
+ "type": "integer",
1780
+ "primaryKey": false,
1781
+ "notNull": false
1782
+ },
1783
+ "weight_grams": {
1784
+ "name": "weight_grams",
1785
+ "type": "integer",
1786
+ "primaryKey": false,
1787
+ "notNull": false
1788
+ },
1789
+ "dimensions": {
1790
+ "name": "dimensions",
1791
+ "type": "jsonb",
1792
+ "primaryKey": false,
1793
+ "notNull": false
1794
+ },
1795
+ "stock": {
1796
+ "name": "stock",
1797
+ "type": "integer",
1798
+ "primaryKey": false,
1799
+ "notNull": true,
1800
+ "default": 0
1801
+ },
1802
+ "low_stock_threshold": {
1803
+ "name": "low_stock_threshold",
1804
+ "type": "integer",
1805
+ "primaryKey": false,
1806
+ "notNull": true,
1807
+ "default": 0
1808
+ },
1809
+ "options": {
1810
+ "name": "options",
1811
+ "type": "jsonb",
1812
+ "primaryKey": false,
1813
+ "notNull": true,
1814
+ "default": "'[]'::jsonb"
1815
+ },
1816
+ "status": {
1817
+ "name": "status",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": true,
1821
+ "default": "'active'"
1822
+ },
1823
+ "created_at": {
1824
+ "name": "created_at",
1825
+ "type": "timestamp with time zone",
1826
+ "primaryKey": false,
1827
+ "notNull": true
1828
+ },
1829
+ "updated_at": {
1830
+ "name": "updated_at",
1831
+ "type": "timestamp with time zone",
1832
+ "primaryKey": false,
1833
+ "notNull": true
1834
+ }
1835
+ },
1836
+ "indexes": {
1837
+ "variants_sku_unique": {
1838
+ "name": "variants_sku_unique",
1839
+ "columns": [
1840
+ {
1841
+ "expression": "sku",
1842
+ "isExpression": false,
1843
+ "asc": true,
1844
+ "nulls": "last"
1845
+ }
1846
+ ],
1847
+ "isUnique": true,
1848
+ "concurrently": false,
1849
+ "method": "btree",
1850
+ "with": {}
1851
+ },
1852
+ "variants_product_idx": {
1853
+ "name": "variants_product_idx",
1854
+ "columns": [
1855
+ {
1856
+ "expression": "product_id",
1857
+ "isExpression": false,
1858
+ "asc": true,
1859
+ "nulls": "last"
1860
+ }
1861
+ ],
1862
+ "isUnique": false,
1863
+ "concurrently": false,
1864
+ "method": "btree",
1865
+ "with": {}
1866
+ }
1867
+ },
1868
+ "foreignKeys": {},
1869
+ "compositePrimaryKeys": {},
1870
+ "uniqueConstraints": {},
1871
+ "policies": {},
1872
+ "checkConstraints": {},
1873
+ "isRLSEnabled": false
1874
+ }
1875
+ },
1876
+ "enums": {},
1877
+ "schemas": {},
1878
+ "sequences": {},
1879
+ "roles": {},
1880
+ "policies": {},
1881
+ "views": {},
1882
+ "_meta": {
1883
+ "columns": {},
1884
+ "schemas": {},
1885
+ "tables": {}
1886
+ }
1887
+ }