@nymbalhq/platform 1.0.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 (41) 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 +499 -44
  8. package/dist/index.js +2227 -1888
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-NHG3TIRQ.js +8 -0
  11. package/migrations/postgres/0007_native_search.sql +12 -0
  12. package/migrations/postgres/0008_event_correlation.sql +6 -0
  13. package/migrations/postgres/0009_settings.sql +13 -0
  14. package/migrations/postgres/0010_catch_up_index.sql +2 -0
  15. package/migrations/postgres/0011_audit_entries.sql +27 -0
  16. package/migrations/postgres/meta/0007_snapshot.json +1598 -0
  17. package/migrations/postgres/meta/0008_snapshot.json +1625 -0
  18. package/migrations/postgres/meta/0009_snapshot.json +1705 -0
  19. package/migrations/postgres/meta/0010_snapshot.json +1732 -0
  20. package/migrations/postgres/meta/0011_snapshot.json +1887 -0
  21. package/migrations/postgres/meta/_journal.json +35 -0
  22. package/migrations/sqlite/0007_native_search.sql +39 -0
  23. package/migrations/sqlite/0008_event_correlation.sql +7 -0
  24. package/migrations/sqlite/0009_settings.sql +13 -0
  25. package/migrations/sqlite/0010_catch_up_index.sql +2 -0
  26. package/migrations/sqlite/0011_audit_entries.sql +26 -0
  27. package/migrations/sqlite/meta/0007_snapshot.json +1470 -0
  28. package/migrations/sqlite/meta/0008_snapshot.json +1485 -0
  29. package/migrations/sqlite/meta/0009_snapshot.json +1571 -0
  30. package/migrations/sqlite/meta/0010_snapshot.json +1580 -0
  31. package/migrations/sqlite/meta/0011_snapshot.json +1705 -0
  32. package/migrations/sqlite/meta/_journal.json +35 -0
  33. package/package.json +45 -17
  34. package/recipes/postgres.json +17 -0
  35. package/dist/chunk-74KODSYJ.js +0 -2564
  36. package/dist/chunk-74KODSYJ.js.map +0 -1
  37. package/dist/chunk-PW6ILJF7.js.map +0 -1
  38. package/dist/chunk-PZ5AY32C.js +0 -10
  39. package/dist/register-IVFYBJSX.js +0 -8
  40. package/dist/register-IVFYBJSX.js.map +0 -1
  41. /package/dist/{chunk-PZ5AY32C.js.map → register-NHG3TIRQ.js.map} +0 -0
@@ -0,0 +1,1732 @@
1
+ {
2
+ "id": "81418af0-ebe2-4e82-bf09-d6cf90df3ac5",
3
+ "prevId": "42ee29b2-a8ab-4b27-b582-c7d94477b67b",
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
+ "events_catch_up_idx": {
443
+ "name": "events_catch_up_idx",
444
+ "columns": [
445
+ {
446
+ "expression": "dead_at",
447
+ "isExpression": false,
448
+ "asc": true,
449
+ "nulls": "last"
450
+ },
451
+ {
452
+ "expression": "delivered_at",
453
+ "isExpression": false,
454
+ "asc": true,
455
+ "nulls": "last"
456
+ },
457
+ {
458
+ "expression": "seq",
459
+ "isExpression": false,
460
+ "asc": true,
461
+ "nulls": "last"
462
+ }
463
+ ],
464
+ "isUnique": false,
465
+ "concurrently": false,
466
+ "method": "btree",
467
+ "with": {}
468
+ }
469
+ },
470
+ "foreignKeys": {},
471
+ "compositePrimaryKeys": {},
472
+ "uniqueConstraints": {},
473
+ "policies": {},
474
+ "checkConstraints": {},
475
+ "isRLSEnabled": false
476
+ },
477
+ "public.inventory_reservations": {
478
+ "name": "inventory_reservations",
479
+ "schema": "",
480
+ "columns": {
481
+ "reservation_id": {
482
+ "name": "reservation_id",
483
+ "type": "text",
484
+ "primaryKey": true,
485
+ "notNull": true
486
+ },
487
+ "variant_id": {
488
+ "name": "variant_id",
489
+ "type": "text",
490
+ "primaryKey": false,
491
+ "notNull": true
492
+ },
493
+ "qty": {
494
+ "name": "qty",
495
+ "type": "integer",
496
+ "primaryKey": false,
497
+ "notNull": true
498
+ },
499
+ "order_ref": {
500
+ "name": "order_ref",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": false
504
+ },
505
+ "expires_at": {
506
+ "name": "expires_at",
507
+ "type": "timestamp with time zone",
508
+ "primaryKey": false,
509
+ "notNull": true
510
+ },
511
+ "created_at": {
512
+ "name": "created_at",
513
+ "type": "timestamp with time zone",
514
+ "primaryKey": false,
515
+ "notNull": true
516
+ }
517
+ },
518
+ "indexes": {
519
+ "inv_reservations_variant_idx": {
520
+ "name": "inv_reservations_variant_idx",
521
+ "columns": [
522
+ {
523
+ "expression": "variant_id",
524
+ "isExpression": false,
525
+ "asc": true,
526
+ "nulls": "last"
527
+ }
528
+ ],
529
+ "isUnique": false,
530
+ "concurrently": false,
531
+ "method": "btree",
532
+ "with": {}
533
+ },
534
+ "inv_reservations_expires_idx": {
535
+ "name": "inv_reservations_expires_idx",
536
+ "columns": [
537
+ {
538
+ "expression": "expires_at",
539
+ "isExpression": false,
540
+ "asc": true,
541
+ "nulls": "last"
542
+ }
543
+ ],
544
+ "isUnique": false,
545
+ "concurrently": false,
546
+ "method": "btree",
547
+ "with": {}
548
+ }
549
+ },
550
+ "foreignKeys": {},
551
+ "compositePrimaryKeys": {},
552
+ "uniqueConstraints": {},
553
+ "policies": {},
554
+ "checkConstraints": {},
555
+ "isRLSEnabled": false
556
+ },
557
+ "public.order_history": {
558
+ "name": "order_history",
559
+ "schema": "",
560
+ "columns": {
561
+ "id": {
562
+ "name": "id",
563
+ "type": "text",
564
+ "primaryKey": true,
565
+ "notNull": true
566
+ },
567
+ "order_id": {
568
+ "name": "order_id",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": true
572
+ },
573
+ "from_status": {
574
+ "name": "from_status",
575
+ "type": "text",
576
+ "primaryKey": false,
577
+ "notNull": false
578
+ },
579
+ "to_status": {
580
+ "name": "to_status",
581
+ "type": "text",
582
+ "primaryKey": false,
583
+ "notNull": true
584
+ },
585
+ "actor": {
586
+ "name": "actor",
587
+ "type": "text",
588
+ "primaryKey": false,
589
+ "notNull": true
590
+ },
591
+ "note": {
592
+ "name": "note",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true,
596
+ "default": "''"
597
+ },
598
+ "timestamp": {
599
+ "name": "timestamp",
600
+ "type": "timestamp with time zone",
601
+ "primaryKey": false,
602
+ "notNull": true
603
+ }
604
+ },
605
+ "indexes": {
606
+ "order_history_order_idx": {
607
+ "name": "order_history_order_idx",
608
+ "columns": [
609
+ {
610
+ "expression": "order_id",
611
+ "isExpression": false,
612
+ "asc": true,
613
+ "nulls": "last"
614
+ }
615
+ ],
616
+ "isUnique": false,
617
+ "concurrently": false,
618
+ "method": "btree",
619
+ "with": {}
620
+ }
621
+ },
622
+ "foreignKeys": {},
623
+ "compositePrimaryKeys": {},
624
+ "uniqueConstraints": {},
625
+ "policies": {},
626
+ "checkConstraints": {},
627
+ "isRLSEnabled": false
628
+ },
629
+ "public.order_refunds": {
630
+ "name": "order_refunds",
631
+ "schema": "",
632
+ "columns": {
633
+ "id": {
634
+ "name": "id",
635
+ "type": "text",
636
+ "primaryKey": true,
637
+ "notNull": true
638
+ },
639
+ "order_id": {
640
+ "name": "order_id",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": true
644
+ },
645
+ "amount_minor": {
646
+ "name": "amount_minor",
647
+ "type": "integer",
648
+ "primaryKey": false,
649
+ "notNull": true
650
+ },
651
+ "currency": {
652
+ "name": "currency",
653
+ "type": "text",
654
+ "primaryKey": false,
655
+ "notNull": true
656
+ },
657
+ "provider_refund_id": {
658
+ "name": "provider_refund_id",
659
+ "type": "text",
660
+ "primaryKey": false,
661
+ "notNull": false
662
+ },
663
+ "status": {
664
+ "name": "status",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "default": "'pending'"
669
+ },
670
+ "reason": {
671
+ "name": "reason",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": false
675
+ },
676
+ "actor": {
677
+ "name": "actor",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": true
681
+ },
682
+ "created_at": {
683
+ "name": "created_at",
684
+ "type": "timestamp with time zone",
685
+ "primaryKey": false,
686
+ "notNull": true
687
+ },
688
+ "request_id": {
689
+ "name": "request_id",
690
+ "type": "text",
691
+ "primaryKey": false,
692
+ "notNull": false
693
+ }
694
+ },
695
+ "indexes": {
696
+ "order_refunds_order_idx": {
697
+ "name": "order_refunds_order_idx",
698
+ "columns": [
699
+ {
700
+ "expression": "order_id",
701
+ "isExpression": false,
702
+ "asc": true,
703
+ "nulls": "last"
704
+ }
705
+ ],
706
+ "isUnique": false,
707
+ "concurrently": false,
708
+ "method": "btree",
709
+ "with": {}
710
+ },
711
+ "order_refunds_order_request_idx": {
712
+ "name": "order_refunds_order_request_idx",
713
+ "columns": [
714
+ {
715
+ "expression": "order_id",
716
+ "isExpression": false,
717
+ "asc": true,
718
+ "nulls": "last"
719
+ },
720
+ {
721
+ "expression": "request_id",
722
+ "isExpression": false,
723
+ "asc": true,
724
+ "nulls": "last"
725
+ }
726
+ ],
727
+ "isUnique": true,
728
+ "concurrently": false,
729
+ "method": "btree",
730
+ "with": {}
731
+ }
732
+ },
733
+ "foreignKeys": {},
734
+ "compositePrimaryKeys": {},
735
+ "uniqueConstraints": {},
736
+ "policies": {},
737
+ "checkConstraints": {},
738
+ "isRLSEnabled": false
739
+ },
740
+ "public.order_sequences": {
741
+ "name": "order_sequences",
742
+ "schema": "",
743
+ "columns": {
744
+ "id": {
745
+ "name": "id",
746
+ "type": "integer",
747
+ "primaryKey": true,
748
+ "notNull": true
749
+ },
750
+ "next_value": {
751
+ "name": "next_value",
752
+ "type": "integer",
753
+ "primaryKey": false,
754
+ "notNull": true
755
+ }
756
+ },
757
+ "indexes": {},
758
+ "foreignKeys": {},
759
+ "compositePrimaryKeys": {},
760
+ "uniqueConstraints": {},
761
+ "policies": {},
762
+ "checkConstraints": {},
763
+ "isRLSEnabled": false
764
+ },
765
+ "public.orders": {
766
+ "name": "orders",
767
+ "schema": "",
768
+ "columns": {
769
+ "id": {
770
+ "name": "id",
771
+ "type": "text",
772
+ "primaryKey": true,
773
+ "notNull": true
774
+ },
775
+ "order_number": {
776
+ "name": "order_number",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true
780
+ },
781
+ "sequence": {
782
+ "name": "sequence",
783
+ "type": "integer",
784
+ "primaryKey": false,
785
+ "notNull": true
786
+ },
787
+ "customer_id": {
788
+ "name": "customer_id",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": false
792
+ },
793
+ "status": {
794
+ "name": "status",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "default": "'pending'"
799
+ },
800
+ "email": {
801
+ "name": "email",
802
+ "type": "text",
803
+ "primaryKey": false,
804
+ "notNull": true
805
+ },
806
+ "billing_address": {
807
+ "name": "billing_address",
808
+ "type": "jsonb",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ },
812
+ "shipping_address": {
813
+ "name": "shipping_address",
814
+ "type": "jsonb",
815
+ "primaryKey": false,
816
+ "notNull": true
817
+ },
818
+ "line_items": {
819
+ "name": "line_items",
820
+ "type": "jsonb",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "subtotal_minor": {
825
+ "name": "subtotal_minor",
826
+ "type": "integer",
827
+ "primaryKey": false,
828
+ "notNull": true
829
+ },
830
+ "tax_total_minor": {
831
+ "name": "tax_total_minor",
832
+ "type": "integer",
833
+ "primaryKey": false,
834
+ "notNull": true,
835
+ "default": 0
836
+ },
837
+ "shipping_total_minor": {
838
+ "name": "shipping_total_minor",
839
+ "type": "integer",
840
+ "primaryKey": false,
841
+ "notNull": true,
842
+ "default": 0
843
+ },
844
+ "discount_total_minor": {
845
+ "name": "discount_total_minor",
846
+ "type": "integer",
847
+ "primaryKey": false,
848
+ "notNull": true,
849
+ "default": 0
850
+ },
851
+ "total_minor": {
852
+ "name": "total_minor",
853
+ "type": "integer",
854
+ "primaryKey": false,
855
+ "notNull": true
856
+ },
857
+ "currency": {
858
+ "name": "currency",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": true
862
+ },
863
+ "notes": {
864
+ "name": "notes",
865
+ "type": "text",
866
+ "primaryKey": false,
867
+ "notNull": true,
868
+ "default": "''"
869
+ },
870
+ "metadata": {
871
+ "name": "metadata",
872
+ "type": "jsonb",
873
+ "primaryKey": false,
874
+ "notNull": true,
875
+ "default": "'{}'::jsonb"
876
+ },
877
+ "payment_intent_id": {
878
+ "name": "payment_intent_id",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": false
882
+ },
883
+ "cart_token": {
884
+ "name": "cart_token",
885
+ "type": "text",
886
+ "primaryKey": false,
887
+ "notNull": false
888
+ },
889
+ "captured_minor": {
890
+ "name": "captured_minor",
891
+ "type": "integer",
892
+ "primaryKey": false,
893
+ "notNull": true,
894
+ "default": 0
895
+ },
896
+ "captured_at": {
897
+ "name": "captured_at",
898
+ "type": "timestamp with time zone",
899
+ "primaryKey": false,
900
+ "notNull": false
901
+ },
902
+ "refunded_minor": {
903
+ "name": "refunded_minor",
904
+ "type": "integer",
905
+ "primaryKey": false,
906
+ "notNull": true,
907
+ "default": 0
908
+ },
909
+ "capture_method": {
910
+ "name": "capture_method",
911
+ "type": "text",
912
+ "primaryKey": false,
913
+ "notNull": false
914
+ },
915
+ "created_at": {
916
+ "name": "created_at",
917
+ "type": "timestamp with time zone",
918
+ "primaryKey": false,
919
+ "notNull": true
920
+ },
921
+ "updated_at": {
922
+ "name": "updated_at",
923
+ "type": "timestamp with time zone",
924
+ "primaryKey": false,
925
+ "notNull": true
926
+ }
927
+ },
928
+ "indexes": {
929
+ "orders_number_unique": {
930
+ "name": "orders_number_unique",
931
+ "columns": [
932
+ {
933
+ "expression": "order_number",
934
+ "isExpression": false,
935
+ "asc": true,
936
+ "nulls": "last"
937
+ }
938
+ ],
939
+ "isUnique": true,
940
+ "concurrently": false,
941
+ "method": "btree",
942
+ "with": {}
943
+ },
944
+ "orders_sequence_unique": {
945
+ "name": "orders_sequence_unique",
946
+ "columns": [
947
+ {
948
+ "expression": "sequence",
949
+ "isExpression": false,
950
+ "asc": true,
951
+ "nulls": "last"
952
+ }
953
+ ],
954
+ "isUnique": true,
955
+ "concurrently": false,
956
+ "method": "btree",
957
+ "with": {}
958
+ },
959
+ "orders_customer_idx": {
960
+ "name": "orders_customer_idx",
961
+ "columns": [
962
+ {
963
+ "expression": "customer_id",
964
+ "isExpression": false,
965
+ "asc": true,
966
+ "nulls": "last"
967
+ }
968
+ ],
969
+ "isUnique": false,
970
+ "concurrently": false,
971
+ "method": "btree",
972
+ "with": {}
973
+ },
974
+ "orders_status_idx": {
975
+ "name": "orders_status_idx",
976
+ "columns": [
977
+ {
978
+ "expression": "status",
979
+ "isExpression": false,
980
+ "asc": true,
981
+ "nulls": "last"
982
+ }
983
+ ],
984
+ "isUnique": false,
985
+ "concurrently": false,
986
+ "method": "btree",
987
+ "with": {}
988
+ },
989
+ "orders_payment_intent_idx": {
990
+ "name": "orders_payment_intent_idx",
991
+ "columns": [
992
+ {
993
+ "expression": "payment_intent_id",
994
+ "isExpression": false,
995
+ "asc": true,
996
+ "nulls": "last"
997
+ }
998
+ ],
999
+ "isUnique": false,
1000
+ "concurrently": false,
1001
+ "method": "btree",
1002
+ "with": {}
1003
+ },
1004
+ "orders_pending_cart_unique": {
1005
+ "name": "orders_pending_cart_unique",
1006
+ "columns": [
1007
+ {
1008
+ "expression": "cart_token",
1009
+ "isExpression": false,
1010
+ "asc": true,
1011
+ "nulls": "last"
1012
+ }
1013
+ ],
1014
+ "isUnique": true,
1015
+ "where": "status = 'pending'",
1016
+ "concurrently": false,
1017
+ "method": "btree",
1018
+ "with": {}
1019
+ }
1020
+ },
1021
+ "foreignKeys": {},
1022
+ "compositePrimaryKeys": {},
1023
+ "uniqueConstraints": {},
1024
+ "policies": {},
1025
+ "checkConstraints": {},
1026
+ "isRLSEnabled": false
1027
+ },
1028
+ "public.processed_events": {
1029
+ "name": "processed_events",
1030
+ "schema": "",
1031
+ "columns": {
1032
+ "handler_name": {
1033
+ "name": "handler_name",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": true
1037
+ },
1038
+ "event_id": {
1039
+ "name": "event_id",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": true
1043
+ },
1044
+ "processed_at": {
1045
+ "name": "processed_at",
1046
+ "type": "timestamp with time zone",
1047
+ "primaryKey": false,
1048
+ "notNull": true
1049
+ }
1050
+ },
1051
+ "indexes": {},
1052
+ "foreignKeys": {},
1053
+ "compositePrimaryKeys": {
1054
+ "processed_events_handler_name_event_id_pk": {
1055
+ "name": "processed_events_handler_name_event_id_pk",
1056
+ "columns": [
1057
+ "handler_name",
1058
+ "event_id"
1059
+ ]
1060
+ }
1061
+ },
1062
+ "uniqueConstraints": {},
1063
+ "policies": {},
1064
+ "checkConstraints": {},
1065
+ "isRLSEnabled": false
1066
+ },
1067
+ "public.product_categories": {
1068
+ "name": "product_categories",
1069
+ "schema": "",
1070
+ "columns": {
1071
+ "product_id": {
1072
+ "name": "product_id",
1073
+ "type": "text",
1074
+ "primaryKey": false,
1075
+ "notNull": true
1076
+ },
1077
+ "category_id": {
1078
+ "name": "category_id",
1079
+ "type": "text",
1080
+ "primaryKey": false,
1081
+ "notNull": true
1082
+ }
1083
+ },
1084
+ "indexes": {
1085
+ "product_categories_category_idx": {
1086
+ "name": "product_categories_category_idx",
1087
+ "columns": [
1088
+ {
1089
+ "expression": "category_id",
1090
+ "isExpression": false,
1091
+ "asc": true,
1092
+ "nulls": "last"
1093
+ }
1094
+ ],
1095
+ "isUnique": false,
1096
+ "concurrently": false,
1097
+ "method": "btree",
1098
+ "with": {}
1099
+ }
1100
+ },
1101
+ "foreignKeys": {},
1102
+ "compositePrimaryKeys": {
1103
+ "product_categories_product_id_category_id_pk": {
1104
+ "name": "product_categories_product_id_category_id_pk",
1105
+ "columns": [
1106
+ "product_id",
1107
+ "category_id"
1108
+ ]
1109
+ }
1110
+ },
1111
+ "uniqueConstraints": {},
1112
+ "policies": {},
1113
+ "checkConstraints": {},
1114
+ "isRLSEnabled": false
1115
+ },
1116
+ "public.products": {
1117
+ "name": "products",
1118
+ "schema": "",
1119
+ "columns": {
1120
+ "id": {
1121
+ "name": "id",
1122
+ "type": "text",
1123
+ "primaryKey": true,
1124
+ "notNull": true
1125
+ },
1126
+ "slug": {
1127
+ "name": "slug",
1128
+ "type": "text",
1129
+ "primaryKey": false,
1130
+ "notNull": true
1131
+ },
1132
+ "name": {
1133
+ "name": "name",
1134
+ "type": "text",
1135
+ "primaryKey": false,
1136
+ "notNull": true
1137
+ },
1138
+ "description": {
1139
+ "name": "description",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "default": "''"
1144
+ },
1145
+ "short_description": {
1146
+ "name": "short_description",
1147
+ "type": "text",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "default": "''"
1151
+ },
1152
+ "status": {
1153
+ "name": "status",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "default": "'draft'"
1158
+ },
1159
+ "type": {
1160
+ "name": "type",
1161
+ "type": "text",
1162
+ "primaryKey": false,
1163
+ "notNull": true,
1164
+ "default": "'simple'"
1165
+ },
1166
+ "seo_title": {
1167
+ "name": "seo_title",
1168
+ "type": "text",
1169
+ "primaryKey": false,
1170
+ "notNull": true,
1171
+ "default": "''"
1172
+ },
1173
+ "seo_description": {
1174
+ "name": "seo_description",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": true,
1178
+ "default": "''"
1179
+ },
1180
+ "media": {
1181
+ "name": "media",
1182
+ "type": "jsonb",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "default": "'[]'::jsonb"
1186
+ },
1187
+ "metadata": {
1188
+ "name": "metadata",
1189
+ "type": "jsonb",
1190
+ "primaryKey": false,
1191
+ "notNull": true,
1192
+ "default": "'{}'::jsonb"
1193
+ },
1194
+ "created_at": {
1195
+ "name": "created_at",
1196
+ "type": "timestamp with time zone",
1197
+ "primaryKey": false,
1198
+ "notNull": true
1199
+ },
1200
+ "updated_at": {
1201
+ "name": "updated_at",
1202
+ "type": "timestamp with time zone",
1203
+ "primaryKey": false,
1204
+ "notNull": true
1205
+ }
1206
+ },
1207
+ "indexes": {
1208
+ "products_slug_unique": {
1209
+ "name": "products_slug_unique",
1210
+ "columns": [
1211
+ {
1212
+ "expression": "slug",
1213
+ "isExpression": false,
1214
+ "asc": true,
1215
+ "nulls": "last"
1216
+ }
1217
+ ],
1218
+ "isUnique": true,
1219
+ "concurrently": false,
1220
+ "method": "btree",
1221
+ "with": {}
1222
+ },
1223
+ "products_status_idx": {
1224
+ "name": "products_status_idx",
1225
+ "columns": [
1226
+ {
1227
+ "expression": "status",
1228
+ "isExpression": false,
1229
+ "asc": true,
1230
+ "nulls": "last"
1231
+ }
1232
+ ],
1233
+ "isUnique": false,
1234
+ "concurrently": false,
1235
+ "method": "btree",
1236
+ "with": {}
1237
+ }
1238
+ },
1239
+ "foreignKeys": {},
1240
+ "compositePrimaryKeys": {},
1241
+ "uniqueConstraints": {},
1242
+ "policies": {},
1243
+ "checkConstraints": {},
1244
+ "isRLSEnabled": false
1245
+ },
1246
+ "public.refresh_tokens": {
1247
+ "name": "refresh_tokens",
1248
+ "schema": "",
1249
+ "columns": {
1250
+ "id": {
1251
+ "name": "id",
1252
+ "type": "text",
1253
+ "primaryKey": true,
1254
+ "notNull": true
1255
+ },
1256
+ "customer_id": {
1257
+ "name": "customer_id",
1258
+ "type": "text",
1259
+ "primaryKey": false,
1260
+ "notNull": true
1261
+ },
1262
+ "token_hash": {
1263
+ "name": "token_hash",
1264
+ "type": "text",
1265
+ "primaryKey": false,
1266
+ "notNull": true
1267
+ },
1268
+ "revoked_at": {
1269
+ "name": "revoked_at",
1270
+ "type": "timestamp with time zone",
1271
+ "primaryKey": false,
1272
+ "notNull": false
1273
+ },
1274
+ "replaced_by_jti": {
1275
+ "name": "replaced_by_jti",
1276
+ "type": "text",
1277
+ "primaryKey": false,
1278
+ "notNull": false
1279
+ },
1280
+ "expires_at": {
1281
+ "name": "expires_at",
1282
+ "type": "timestamp with time zone",
1283
+ "primaryKey": false,
1284
+ "notNull": true
1285
+ },
1286
+ "created_at": {
1287
+ "name": "created_at",
1288
+ "type": "timestamp with time zone",
1289
+ "primaryKey": false,
1290
+ "notNull": true
1291
+ }
1292
+ },
1293
+ "indexes": {
1294
+ "refresh_tokens_customer_idx": {
1295
+ "name": "refresh_tokens_customer_idx",
1296
+ "columns": [
1297
+ {
1298
+ "expression": "customer_id",
1299
+ "isExpression": false,
1300
+ "asc": true,
1301
+ "nulls": "last"
1302
+ }
1303
+ ],
1304
+ "isUnique": false,
1305
+ "concurrently": false,
1306
+ "method": "btree",
1307
+ "with": {}
1308
+ }
1309
+ },
1310
+ "foreignKeys": {},
1311
+ "compositePrimaryKeys": {},
1312
+ "uniqueConstraints": {},
1313
+ "policies": {},
1314
+ "checkConstraints": {},
1315
+ "isRLSEnabled": false
1316
+ },
1317
+ "public.reviews": {
1318
+ "name": "reviews",
1319
+ "schema": "",
1320
+ "columns": {
1321
+ "id": {
1322
+ "name": "id",
1323
+ "type": "text",
1324
+ "primaryKey": true,
1325
+ "notNull": true
1326
+ },
1327
+ "product_id": {
1328
+ "name": "product_id",
1329
+ "type": "text",
1330
+ "primaryKey": false,
1331
+ "notNull": true
1332
+ },
1333
+ "customer_id": {
1334
+ "name": "customer_id",
1335
+ "type": "text",
1336
+ "primaryKey": false,
1337
+ "notNull": false
1338
+ },
1339
+ "order_id": {
1340
+ "name": "order_id",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": false
1344
+ },
1345
+ "rating": {
1346
+ "name": "rating",
1347
+ "type": "integer",
1348
+ "primaryKey": false,
1349
+ "notNull": true
1350
+ },
1351
+ "title": {
1352
+ "name": "title",
1353
+ "type": "text",
1354
+ "primaryKey": false,
1355
+ "notNull": true,
1356
+ "default": "''"
1357
+ },
1358
+ "body": {
1359
+ "name": "body",
1360
+ "type": "text",
1361
+ "primaryKey": false,
1362
+ "notNull": true,
1363
+ "default": "''"
1364
+ },
1365
+ "moderation_status": {
1366
+ "name": "moderation_status",
1367
+ "type": "text",
1368
+ "primaryKey": false,
1369
+ "notNull": true,
1370
+ "default": "'pending'"
1371
+ },
1372
+ "submitted_at": {
1373
+ "name": "submitted_at",
1374
+ "type": "timestamp with time zone",
1375
+ "primaryKey": false,
1376
+ "notNull": true
1377
+ },
1378
+ "moderated_at": {
1379
+ "name": "moderated_at",
1380
+ "type": "timestamp with time zone",
1381
+ "primaryKey": false,
1382
+ "notNull": false
1383
+ },
1384
+ "moderated_by": {
1385
+ "name": "moderated_by",
1386
+ "type": "text",
1387
+ "primaryKey": false,
1388
+ "notNull": false
1389
+ }
1390
+ },
1391
+ "indexes": {
1392
+ "reviews_product_idx": {
1393
+ "name": "reviews_product_idx",
1394
+ "columns": [
1395
+ {
1396
+ "expression": "product_id",
1397
+ "isExpression": false,
1398
+ "asc": true,
1399
+ "nulls": "last"
1400
+ }
1401
+ ],
1402
+ "isUnique": false,
1403
+ "concurrently": false,
1404
+ "method": "btree",
1405
+ "with": {}
1406
+ },
1407
+ "reviews_status_idx": {
1408
+ "name": "reviews_status_idx",
1409
+ "columns": [
1410
+ {
1411
+ "expression": "moderation_status",
1412
+ "isExpression": false,
1413
+ "asc": true,
1414
+ "nulls": "last"
1415
+ }
1416
+ ],
1417
+ "isUnique": false,
1418
+ "concurrently": false,
1419
+ "method": "btree",
1420
+ "with": {}
1421
+ }
1422
+ },
1423
+ "foreignKeys": {},
1424
+ "compositePrimaryKeys": {},
1425
+ "uniqueConstraints": {},
1426
+ "policies": {},
1427
+ "checkConstraints": {},
1428
+ "isRLSEnabled": false
1429
+ },
1430
+ "public.settings": {
1431
+ "name": "settings",
1432
+ "schema": "",
1433
+ "columns": {
1434
+ "slot": {
1435
+ "name": "slot",
1436
+ "type": "text",
1437
+ "primaryKey": false,
1438
+ "notNull": true
1439
+ },
1440
+ "path": {
1441
+ "name": "path",
1442
+ "type": "text",
1443
+ "primaryKey": false,
1444
+ "notNull": true
1445
+ },
1446
+ "ciphertext": {
1447
+ "name": "ciphertext",
1448
+ "type": "bytea",
1449
+ "primaryKey": false,
1450
+ "notNull": false
1451
+ },
1452
+ "plain": {
1453
+ "name": "plain",
1454
+ "type": "text",
1455
+ "primaryKey": false,
1456
+ "notNull": false
1457
+ },
1458
+ "iv": {
1459
+ "name": "iv",
1460
+ "type": "bytea",
1461
+ "primaryKey": false,
1462
+ "notNull": false
1463
+ },
1464
+ "tag": {
1465
+ "name": "tag",
1466
+ "type": "bytea",
1467
+ "primaryKey": false,
1468
+ "notNull": false
1469
+ },
1470
+ "key_id": {
1471
+ "name": "key_id",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": false
1475
+ },
1476
+ "updated_at": {
1477
+ "name": "updated_at",
1478
+ "type": "timestamp with time zone",
1479
+ "primaryKey": false,
1480
+ "notNull": true
1481
+ },
1482
+ "updated_by": {
1483
+ "name": "updated_by",
1484
+ "type": "text",
1485
+ "primaryKey": false,
1486
+ "notNull": false
1487
+ }
1488
+ },
1489
+ "indexes": {},
1490
+ "foreignKeys": {},
1491
+ "compositePrimaryKeys": {
1492
+ "settings_slot_path_pk": {
1493
+ "name": "settings_slot_path_pk",
1494
+ "columns": [
1495
+ "slot",
1496
+ "path"
1497
+ ]
1498
+ }
1499
+ },
1500
+ "uniqueConstraints": {},
1501
+ "policies": {},
1502
+ "checkConstraints": {
1503
+ "settings_one_value": {
1504
+ "name": "settings_one_value",
1505
+ "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))"
1506
+ }
1507
+ },
1508
+ "isRLSEnabled": false
1509
+ },
1510
+ "public.stock_adjustments": {
1511
+ "name": "stock_adjustments",
1512
+ "schema": "",
1513
+ "columns": {
1514
+ "id": {
1515
+ "name": "id",
1516
+ "type": "text",
1517
+ "primaryKey": true,
1518
+ "notNull": true
1519
+ },
1520
+ "variant_id": {
1521
+ "name": "variant_id",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": true
1525
+ },
1526
+ "adjustment": {
1527
+ "name": "adjustment",
1528
+ "type": "integer",
1529
+ "primaryKey": false,
1530
+ "notNull": true
1531
+ },
1532
+ "reason": {
1533
+ "name": "reason",
1534
+ "type": "text",
1535
+ "primaryKey": false,
1536
+ "notNull": true
1537
+ },
1538
+ "actor": {
1539
+ "name": "actor",
1540
+ "type": "text",
1541
+ "primaryKey": false,
1542
+ "notNull": true
1543
+ },
1544
+ "previous_qty": {
1545
+ "name": "previous_qty",
1546
+ "type": "integer",
1547
+ "primaryKey": false,
1548
+ "notNull": true
1549
+ },
1550
+ "new_qty": {
1551
+ "name": "new_qty",
1552
+ "type": "integer",
1553
+ "primaryKey": false,
1554
+ "notNull": true
1555
+ },
1556
+ "timestamp": {
1557
+ "name": "timestamp",
1558
+ "type": "timestamp with time zone",
1559
+ "primaryKey": false,
1560
+ "notNull": true
1561
+ }
1562
+ },
1563
+ "indexes": {
1564
+ "stock_adjustments_variant_idx": {
1565
+ "name": "stock_adjustments_variant_idx",
1566
+ "columns": [
1567
+ {
1568
+ "expression": "variant_id",
1569
+ "isExpression": false,
1570
+ "asc": true,
1571
+ "nulls": "last"
1572
+ }
1573
+ ],
1574
+ "isUnique": false,
1575
+ "concurrently": false,
1576
+ "method": "btree",
1577
+ "with": {}
1578
+ }
1579
+ },
1580
+ "foreignKeys": {},
1581
+ "compositePrimaryKeys": {},
1582
+ "uniqueConstraints": {},
1583
+ "policies": {},
1584
+ "checkConstraints": {},
1585
+ "isRLSEnabled": false
1586
+ },
1587
+ "public.variants": {
1588
+ "name": "variants",
1589
+ "schema": "",
1590
+ "columns": {
1591
+ "id": {
1592
+ "name": "id",
1593
+ "type": "text",
1594
+ "primaryKey": true,
1595
+ "notNull": true
1596
+ },
1597
+ "product_id": {
1598
+ "name": "product_id",
1599
+ "type": "text",
1600
+ "primaryKey": false,
1601
+ "notNull": true
1602
+ },
1603
+ "sku": {
1604
+ "name": "sku",
1605
+ "type": "text",
1606
+ "primaryKey": false,
1607
+ "notNull": true
1608
+ },
1609
+ "name": {
1610
+ "name": "name",
1611
+ "type": "text",
1612
+ "primaryKey": false,
1613
+ "notNull": true,
1614
+ "default": "''"
1615
+ },
1616
+ "price_minor": {
1617
+ "name": "price_minor",
1618
+ "type": "integer",
1619
+ "primaryKey": false,
1620
+ "notNull": true
1621
+ },
1622
+ "compare_at_price_minor": {
1623
+ "name": "compare_at_price_minor",
1624
+ "type": "integer",
1625
+ "primaryKey": false,
1626
+ "notNull": false
1627
+ },
1628
+ "weight_grams": {
1629
+ "name": "weight_grams",
1630
+ "type": "integer",
1631
+ "primaryKey": false,
1632
+ "notNull": false
1633
+ },
1634
+ "dimensions": {
1635
+ "name": "dimensions",
1636
+ "type": "jsonb",
1637
+ "primaryKey": false,
1638
+ "notNull": false
1639
+ },
1640
+ "stock": {
1641
+ "name": "stock",
1642
+ "type": "integer",
1643
+ "primaryKey": false,
1644
+ "notNull": true,
1645
+ "default": 0
1646
+ },
1647
+ "low_stock_threshold": {
1648
+ "name": "low_stock_threshold",
1649
+ "type": "integer",
1650
+ "primaryKey": false,
1651
+ "notNull": true,
1652
+ "default": 0
1653
+ },
1654
+ "options": {
1655
+ "name": "options",
1656
+ "type": "jsonb",
1657
+ "primaryKey": false,
1658
+ "notNull": true,
1659
+ "default": "'[]'::jsonb"
1660
+ },
1661
+ "status": {
1662
+ "name": "status",
1663
+ "type": "text",
1664
+ "primaryKey": false,
1665
+ "notNull": true,
1666
+ "default": "'active'"
1667
+ },
1668
+ "created_at": {
1669
+ "name": "created_at",
1670
+ "type": "timestamp with time zone",
1671
+ "primaryKey": false,
1672
+ "notNull": true
1673
+ },
1674
+ "updated_at": {
1675
+ "name": "updated_at",
1676
+ "type": "timestamp with time zone",
1677
+ "primaryKey": false,
1678
+ "notNull": true
1679
+ }
1680
+ },
1681
+ "indexes": {
1682
+ "variants_sku_unique": {
1683
+ "name": "variants_sku_unique",
1684
+ "columns": [
1685
+ {
1686
+ "expression": "sku",
1687
+ "isExpression": false,
1688
+ "asc": true,
1689
+ "nulls": "last"
1690
+ }
1691
+ ],
1692
+ "isUnique": true,
1693
+ "concurrently": false,
1694
+ "method": "btree",
1695
+ "with": {}
1696
+ },
1697
+ "variants_product_idx": {
1698
+ "name": "variants_product_idx",
1699
+ "columns": [
1700
+ {
1701
+ "expression": "product_id",
1702
+ "isExpression": false,
1703
+ "asc": true,
1704
+ "nulls": "last"
1705
+ }
1706
+ ],
1707
+ "isUnique": false,
1708
+ "concurrently": false,
1709
+ "method": "btree",
1710
+ "with": {}
1711
+ }
1712
+ },
1713
+ "foreignKeys": {},
1714
+ "compositePrimaryKeys": {},
1715
+ "uniqueConstraints": {},
1716
+ "policies": {},
1717
+ "checkConstraints": {},
1718
+ "isRLSEnabled": false
1719
+ }
1720
+ },
1721
+ "enums": {},
1722
+ "schemas": {},
1723
+ "sequences": {},
1724
+ "roles": {},
1725
+ "policies": {},
1726
+ "views": {},
1727
+ "_meta": {
1728
+ "columns": {},
1729
+ "schemas": {},
1730
+ "tables": {}
1731
+ }
1732
+ }