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