@nymbalhq/platform 1.4.0 → 1.6.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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -0
  3. package/dist/{chunk-GMV3B3SC.js → chunk-KH3BABMV.js} +10570 -7364
  4. package/dist/chunk-KH3BABMV.js.map +1 -0
  5. package/dist/{chunk-SNNK2OX3.js → chunk-TVKV5GBY.js} +172 -9
  6. package/dist/chunk-TVKV5GBY.js.map +1 -0
  7. package/dist/db/schema/index.d.ts +6537 -3506
  8. package/dist/db/schema/index.js +1 -1
  9. package/dist/index.d.ts +893 -129
  10. package/dist/index.js +4321 -1905
  11. package/dist/index.js.map +1 -1
  12. package/dist/register-XP5XVAXM.js +8 -0
  13. package/migrations/postgres/0016_email_suppressions.sql +7 -0
  14. package/migrations/postgres/0017_order_shipments.sql +14 -0
  15. package/migrations/postgres/0018_order_key_expiry.sql +8 -0
  16. package/migrations/postgres/0019_carts_customer_idx.sql +1 -0
  17. package/migrations/postgres/0020_alert_confirmation_sent.sql +1 -0
  18. package/migrations/postgres/0021_proposals.sql +27 -0
  19. package/migrations/postgres/0022_order_source.sql +3 -0
  20. package/migrations/postgres/meta/0016_snapshot.json +2233 -0
  21. package/migrations/postgres/meta/0017_snapshot.json +2300 -0
  22. package/migrations/postgres/meta/0018_snapshot.json +2306 -0
  23. package/migrations/postgres/meta/0019_snapshot.json +2322 -0
  24. package/migrations/postgres/meta/0020_snapshot.json +2328 -0
  25. package/migrations/postgres/meta/0021_snapshot.json +2543 -0
  26. package/migrations/postgres/meta/0022_snapshot.json +2578 -0
  27. package/migrations/postgres/meta/_journal.json +49 -0
  28. package/migrations/sqlite/0016_email_suppressions.sql +7 -0
  29. package/migrations/sqlite/0017_order_shipments.sql +9 -0
  30. package/migrations/sqlite/0018_order_key_expiry.sql +25 -0
  31. package/migrations/sqlite/0019_carts_customer_idx.sql +1 -0
  32. package/migrations/sqlite/0020_alert_confirmation_sent.sql +1 -0
  33. package/migrations/sqlite/0021_proposals.sql +27 -0
  34. package/migrations/sqlite/0022_order_source.sql +3 -0
  35. package/migrations/sqlite/meta/0016_snapshot.json +1981 -0
  36. package/migrations/sqlite/meta/0017_snapshot.json +2041 -0
  37. package/migrations/sqlite/meta/0018_snapshot.json +2048 -0
  38. package/migrations/sqlite/meta/0019_snapshot.json +2056 -0
  39. package/migrations/sqlite/meta/0020_snapshot.json +2063 -0
  40. package/migrations/sqlite/meta/0021_snapshot.json +2246 -0
  41. package/migrations/sqlite/meta/0022_snapshot.json +2270 -0
  42. package/migrations/sqlite/meta/_journal.json +49 -0
  43. package/package.json +25 -52
  44. package/dist/chunk-GMV3B3SC.js.map +0 -1
  45. package/dist/chunk-SNNK2OX3.js.map +0 -1
  46. package/dist/register-N2XGSFUF.js +0 -8
  47. /package/dist/{register-N2XGSFUF.js.map → register-XP5XVAXM.js.map} +0 -0
@@ -0,0 +1,2578 @@
1
+ {
2
+ "id": "281285ba-0c5f-447f-95ed-2da297fb4a40",
3
+ "prevId": "46250ef1-75f5-4923-9703-deb4de960726",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.alert_subscriptions": {
8
+ "name": "alert_subscriptions",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "email": {
18
+ "name": "email",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "kind": {
24
+ "name": "kind",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "variant_id": {
30
+ "name": "variant_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "product_id": {
36
+ "name": "product_id",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "status": {
42
+ "name": "status",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "confirm_token": {
48
+ "name": "confirm_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "unsubscribe_token": {
54
+ "name": "unsubscribe_token",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true
58
+ },
59
+ "origin": {
60
+ "name": "origin",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true
64
+ },
65
+ "baseline_price_minor": {
66
+ "name": "baseline_price_minor",
67
+ "type": "integer",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "created_at": {
72
+ "name": "created_at",
73
+ "type": "timestamp with time zone",
74
+ "primaryKey": false,
75
+ "notNull": true
76
+ },
77
+ "updated_at": {
78
+ "name": "updated_at",
79
+ "type": "timestamp with time zone",
80
+ "primaryKey": false,
81
+ "notNull": true
82
+ },
83
+ "confirmed_at": {
84
+ "name": "confirmed_at",
85
+ "type": "timestamp with time zone",
86
+ "primaryKey": false,
87
+ "notNull": false
88
+ },
89
+ "confirmation_sent_at": {
90
+ "name": "confirmation_sent_at",
91
+ "type": "timestamp with time zone",
92
+ "primaryKey": false,
93
+ "notNull": false
94
+ }
95
+ },
96
+ "indexes": {
97
+ "alert_subscriptions_address_unique": {
98
+ "name": "alert_subscriptions_address_unique",
99
+ "columns": [
100
+ {
101
+ "expression": "email",
102
+ "isExpression": false,
103
+ "asc": true,
104
+ "nulls": "last"
105
+ },
106
+ {
107
+ "expression": "variant_id",
108
+ "isExpression": false,
109
+ "asc": true,
110
+ "nulls": "last"
111
+ },
112
+ {
113
+ "expression": "kind",
114
+ "isExpression": false,
115
+ "asc": true,
116
+ "nulls": "last"
117
+ }
118
+ ],
119
+ "isUnique": true,
120
+ "concurrently": false,
121
+ "method": "btree",
122
+ "with": {}
123
+ },
124
+ "alert_subscriptions_confirm_token_unique": {
125
+ "name": "alert_subscriptions_confirm_token_unique",
126
+ "columns": [
127
+ {
128
+ "expression": "confirm_token",
129
+ "isExpression": false,
130
+ "asc": true,
131
+ "nulls": "last"
132
+ }
133
+ ],
134
+ "isUnique": true,
135
+ "concurrently": false,
136
+ "method": "btree",
137
+ "with": {}
138
+ },
139
+ "alert_subscriptions_unsubscribe_token_unique": {
140
+ "name": "alert_subscriptions_unsubscribe_token_unique",
141
+ "columns": [
142
+ {
143
+ "expression": "unsubscribe_token",
144
+ "isExpression": false,
145
+ "asc": true,
146
+ "nulls": "last"
147
+ }
148
+ ],
149
+ "isUnique": true,
150
+ "concurrently": false,
151
+ "method": "btree",
152
+ "with": {}
153
+ },
154
+ "alert_subscriptions_fan_out_idx": {
155
+ "name": "alert_subscriptions_fan_out_idx",
156
+ "columns": [
157
+ {
158
+ "expression": "variant_id",
159
+ "isExpression": false,
160
+ "asc": true,
161
+ "nulls": "last"
162
+ },
163
+ {
164
+ "expression": "kind",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ },
169
+ {
170
+ "expression": "status",
171
+ "isExpression": false,
172
+ "asc": true,
173
+ "nulls": "last"
174
+ }
175
+ ],
176
+ "isUnique": false,
177
+ "concurrently": false,
178
+ "method": "btree",
179
+ "with": {}
180
+ }
181
+ },
182
+ "foreignKeys": {},
183
+ "compositePrimaryKeys": {},
184
+ "uniqueConstraints": {},
185
+ "policies": {},
186
+ "checkConstraints": {
187
+ "alert_subscriptions_kind": {
188
+ "name": "alert_subscriptions_kind",
189
+ "value": "\"alert_subscriptions\".\"kind\" IN ('back_in_stock', 'price_drop')"
190
+ },
191
+ "alert_subscriptions_status": {
192
+ "name": "alert_subscriptions_status",
193
+ "value": "\"alert_subscriptions\".\"status\" IN ('pending', 'active', 'fired', 'unsubscribed')"
194
+ }
195
+ },
196
+ "isRLSEnabled": false
197
+ },
198
+ "public.audit_entries": {
199
+ "name": "audit_entries",
200
+ "schema": "",
201
+ "columns": {
202
+ "id": {
203
+ "name": "id",
204
+ "type": "text",
205
+ "primaryKey": true,
206
+ "notNull": true
207
+ },
208
+ "at": {
209
+ "name": "at",
210
+ "type": "timestamp with time zone",
211
+ "primaryKey": false,
212
+ "notNull": true
213
+ },
214
+ "actor_kind": {
215
+ "name": "actor_kind",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": true
219
+ },
220
+ "actor_id": {
221
+ "name": "actor_id",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": true
225
+ },
226
+ "command": {
227
+ "name": "command",
228
+ "type": "text",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ },
232
+ "subjects": {
233
+ "name": "subjects",
234
+ "type": "jsonb",
235
+ "primaryKey": false,
236
+ "notNull": true
237
+ },
238
+ "correlation_id": {
239
+ "name": "correlation_id",
240
+ "type": "text",
241
+ "primaryKey": false,
242
+ "notNull": false
243
+ },
244
+ "idempotency_key": {
245
+ "name": "idempotency_key",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": false
249
+ },
250
+ "request_hash": {
251
+ "name": "request_hash",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": false
255
+ },
256
+ "outcome": {
257
+ "name": "outcome",
258
+ "type": "text",
259
+ "primaryKey": false,
260
+ "notNull": true
261
+ },
262
+ "response_status": {
263
+ "name": "response_status",
264
+ "type": "integer",
265
+ "primaryKey": false,
266
+ "notNull": false
267
+ },
268
+ "response_body": {
269
+ "name": "response_body",
270
+ "type": "jsonb",
271
+ "primaryKey": false,
272
+ "notNull": false
273
+ }
274
+ },
275
+ "indexes": {
276
+ "audit_entries_applied_key_unique": {
277
+ "name": "audit_entries_applied_key_unique",
278
+ "columns": [
279
+ {
280
+ "expression": "actor_id",
281
+ "isExpression": false,
282
+ "asc": true,
283
+ "nulls": "last"
284
+ },
285
+ {
286
+ "expression": "command",
287
+ "isExpression": false,
288
+ "asc": true,
289
+ "nulls": "last"
290
+ },
291
+ {
292
+ "expression": "idempotency_key",
293
+ "isExpression": false,
294
+ "asc": true,
295
+ "nulls": "last"
296
+ }
297
+ ],
298
+ "isUnique": true,
299
+ "where": "\"audit_entries\".\"outcome\" = 'applied' AND \"audit_entries\".\"idempotency_key\" IS NOT NULL",
300
+ "concurrently": false,
301
+ "method": "btree",
302
+ "with": {}
303
+ },
304
+ "audit_entries_at_idx": {
305
+ "name": "audit_entries_at_idx",
306
+ "columns": [
307
+ {
308
+ "expression": "at",
309
+ "isExpression": false,
310
+ "asc": true,
311
+ "nulls": "last"
312
+ },
313
+ {
314
+ "expression": "id",
315
+ "isExpression": false,
316
+ "asc": true,
317
+ "nulls": "last"
318
+ }
319
+ ],
320
+ "isUnique": false,
321
+ "concurrently": false,
322
+ "method": "btree",
323
+ "with": {}
324
+ },
325
+ "audit_entries_correlation_idx": {
326
+ "name": "audit_entries_correlation_idx",
327
+ "columns": [
328
+ {
329
+ "expression": "correlation_id",
330
+ "isExpression": false,
331
+ "asc": true,
332
+ "nulls": "last"
333
+ }
334
+ ],
335
+ "isUnique": false,
336
+ "concurrently": false,
337
+ "method": "btree",
338
+ "with": {}
339
+ }
340
+ },
341
+ "foreignKeys": {},
342
+ "compositePrimaryKeys": {},
343
+ "uniqueConstraints": {},
344
+ "policies": {},
345
+ "checkConstraints": {
346
+ "audit_entries_outcome": {
347
+ "name": "audit_entries_outcome",
348
+ "value": "\"audit_entries\".\"outcome\" IN ('applied', 'refused', 'replayed')"
349
+ }
350
+ },
351
+ "isRLSEnabled": false
352
+ },
353
+ "public.carts": {
354
+ "name": "carts",
355
+ "schema": "",
356
+ "columns": {
357
+ "token": {
358
+ "name": "token",
359
+ "type": "text",
360
+ "primaryKey": true,
361
+ "notNull": true
362
+ },
363
+ "customer_id": {
364
+ "name": "customer_id",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": false
368
+ },
369
+ "currency": {
370
+ "name": "currency",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": true
374
+ },
375
+ "items": {
376
+ "name": "items",
377
+ "type": "jsonb",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "default": "'[]'::jsonb"
381
+ },
382
+ "line_count": {
383
+ "name": "line_count",
384
+ "type": "integer",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "default": 0
388
+ },
389
+ "subtotal_minor": {
390
+ "name": "subtotal_minor",
391
+ "type": "integer",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "default": 0
395
+ },
396
+ "source": {
397
+ "name": "source",
398
+ "type": "text",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "default": "'storefront'"
402
+ },
403
+ "expires_at": {
404
+ "name": "expires_at",
405
+ "type": "timestamp with time zone",
406
+ "primaryKey": false,
407
+ "notNull": true
408
+ },
409
+ "created_at": {
410
+ "name": "created_at",
411
+ "type": "timestamp with time zone",
412
+ "primaryKey": false,
413
+ "notNull": true
414
+ },
415
+ "updated_at": {
416
+ "name": "updated_at",
417
+ "type": "timestamp with time zone",
418
+ "primaryKey": false,
419
+ "notNull": true
420
+ },
421
+ "abandoned_notified_at": {
422
+ "name": "abandoned_notified_at",
423
+ "type": "timestamp with time zone",
424
+ "primaryKey": false,
425
+ "notNull": false
426
+ }
427
+ },
428
+ "indexes": {
429
+ "carts_expires_idx": {
430
+ "name": "carts_expires_idx",
431
+ "columns": [
432
+ {
433
+ "expression": "expires_at",
434
+ "isExpression": false,
435
+ "asc": true,
436
+ "nulls": "last"
437
+ }
438
+ ],
439
+ "isUnique": false,
440
+ "concurrently": false,
441
+ "method": "btree",
442
+ "with": {}
443
+ },
444
+ "carts_updated_idx": {
445
+ "name": "carts_updated_idx",
446
+ "columns": [
447
+ {
448
+ "expression": "updated_at",
449
+ "isExpression": false,
450
+ "asc": true,
451
+ "nulls": "last"
452
+ }
453
+ ],
454
+ "isUnique": false,
455
+ "concurrently": false,
456
+ "method": "btree",
457
+ "with": {}
458
+ },
459
+ "carts_customer_idx": {
460
+ "name": "carts_customer_idx",
461
+ "columns": [
462
+ {
463
+ "expression": "customer_id",
464
+ "isExpression": false,
465
+ "asc": true,
466
+ "nulls": "last"
467
+ }
468
+ ],
469
+ "isUnique": false,
470
+ "where": "\"carts\".\"customer_id\" IS NOT NULL",
471
+ "concurrently": false,
472
+ "method": "btree",
473
+ "with": {}
474
+ }
475
+ },
476
+ "foreignKeys": {},
477
+ "compositePrimaryKeys": {},
478
+ "uniqueConstraints": {},
479
+ "policies": {},
480
+ "checkConstraints": {},
481
+ "isRLSEnabled": false
482
+ },
483
+ "public.categories": {
484
+ "name": "categories",
485
+ "schema": "",
486
+ "columns": {
487
+ "id": {
488
+ "name": "id",
489
+ "type": "text",
490
+ "primaryKey": true,
491
+ "notNull": true
492
+ },
493
+ "parent_id": {
494
+ "name": "parent_id",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": false
498
+ },
499
+ "slug": {
500
+ "name": "slug",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": true
504
+ },
505
+ "name": {
506
+ "name": "name",
507
+ "type": "text",
508
+ "primaryKey": false,
509
+ "notNull": true
510
+ },
511
+ "description": {
512
+ "name": "description",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": true,
516
+ "default": "''"
517
+ },
518
+ "position": {
519
+ "name": "position",
520
+ "type": "integer",
521
+ "primaryKey": false,
522
+ "notNull": true,
523
+ "default": 0
524
+ },
525
+ "created_at": {
526
+ "name": "created_at",
527
+ "type": "timestamp with time zone",
528
+ "primaryKey": false,
529
+ "notNull": true
530
+ }
531
+ },
532
+ "indexes": {
533
+ "categories_slug_unique": {
534
+ "name": "categories_slug_unique",
535
+ "columns": [
536
+ {
537
+ "expression": "slug",
538
+ "isExpression": false,
539
+ "asc": true,
540
+ "nulls": "last"
541
+ }
542
+ ],
543
+ "isUnique": true,
544
+ "concurrently": false,
545
+ "method": "btree",
546
+ "with": {}
547
+ },
548
+ "categories_parent_idx": {
549
+ "name": "categories_parent_idx",
550
+ "columns": [
551
+ {
552
+ "expression": "parent_id",
553
+ "isExpression": false,
554
+ "asc": true,
555
+ "nulls": "last"
556
+ }
557
+ ],
558
+ "isUnique": false,
559
+ "concurrently": false,
560
+ "method": "btree",
561
+ "with": {}
562
+ }
563
+ },
564
+ "foreignKeys": {},
565
+ "compositePrimaryKeys": {},
566
+ "uniqueConstraints": {},
567
+ "policies": {},
568
+ "checkConstraints": {},
569
+ "isRLSEnabled": false
570
+ },
571
+ "public.customers": {
572
+ "name": "customers",
573
+ "schema": "",
574
+ "columns": {
575
+ "id": {
576
+ "name": "id",
577
+ "type": "text",
578
+ "primaryKey": true,
579
+ "notNull": true
580
+ },
581
+ "email": {
582
+ "name": "email",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": true
586
+ },
587
+ "password_hash": {
588
+ "name": "password_hash",
589
+ "type": "text",
590
+ "primaryKey": false,
591
+ "notNull": true
592
+ },
593
+ "first_name": {
594
+ "name": "first_name",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": true,
598
+ "default": "''"
599
+ },
600
+ "last_name": {
601
+ "name": "last_name",
602
+ "type": "text",
603
+ "primaryKey": false,
604
+ "notNull": true,
605
+ "default": "''"
606
+ },
607
+ "phone": {
608
+ "name": "phone",
609
+ "type": "text",
610
+ "primaryKey": false,
611
+ "notNull": true,
612
+ "default": "''"
613
+ },
614
+ "addresses": {
615
+ "name": "addresses",
616
+ "type": "jsonb",
617
+ "primaryKey": false,
618
+ "notNull": true,
619
+ "default": "'[]'::jsonb"
620
+ },
621
+ "order_count": {
622
+ "name": "order_count",
623
+ "type": "integer",
624
+ "primaryKey": false,
625
+ "notNull": true,
626
+ "default": 0
627
+ },
628
+ "total_spent_minor": {
629
+ "name": "total_spent_minor",
630
+ "type": "integer",
631
+ "primaryKey": false,
632
+ "notNull": true,
633
+ "default": 0
634
+ },
635
+ "metadata": {
636
+ "name": "metadata",
637
+ "type": "jsonb",
638
+ "primaryKey": false,
639
+ "notNull": true,
640
+ "default": "'{}'::jsonb"
641
+ },
642
+ "roles": {
643
+ "name": "roles",
644
+ "type": "jsonb",
645
+ "primaryKey": false,
646
+ "notNull": true,
647
+ "default": "'[\"customer\"]'::jsonb"
648
+ },
649
+ "requires_password_reset": {
650
+ "name": "requires_password_reset",
651
+ "type": "boolean",
652
+ "primaryKey": false,
653
+ "notNull": true,
654
+ "default": false
655
+ },
656
+ "created_at": {
657
+ "name": "created_at",
658
+ "type": "timestamp with time zone",
659
+ "primaryKey": false,
660
+ "notNull": true
661
+ },
662
+ "updated_at": {
663
+ "name": "updated_at",
664
+ "type": "timestamp with time zone",
665
+ "primaryKey": false,
666
+ "notNull": true
667
+ }
668
+ },
669
+ "indexes": {
670
+ "customers_email_unique": {
671
+ "name": "customers_email_unique",
672
+ "columns": [
673
+ {
674
+ "expression": "email",
675
+ "isExpression": false,
676
+ "asc": true,
677
+ "nulls": "last"
678
+ }
679
+ ],
680
+ "isUnique": true,
681
+ "concurrently": false,
682
+ "method": "btree",
683
+ "with": {}
684
+ }
685
+ },
686
+ "foreignKeys": {},
687
+ "compositePrimaryKeys": {},
688
+ "uniqueConstraints": {},
689
+ "policies": {},
690
+ "checkConstraints": {},
691
+ "isRLSEnabled": false
692
+ },
693
+ "public.email_suppressions": {
694
+ "name": "email_suppressions",
695
+ "schema": "",
696
+ "columns": {
697
+ "email": {
698
+ "name": "email",
699
+ "type": "text",
700
+ "primaryKey": true,
701
+ "notNull": true
702
+ },
703
+ "reason": {
704
+ "name": "reason",
705
+ "type": "text",
706
+ "primaryKey": false,
707
+ "notNull": true
708
+ },
709
+ "event_id": {
710
+ "name": "event_id",
711
+ "type": "text",
712
+ "primaryKey": false,
713
+ "notNull": true
714
+ },
715
+ "created_at": {
716
+ "name": "created_at",
717
+ "type": "timestamp with time zone",
718
+ "primaryKey": false,
719
+ "notNull": true
720
+ }
721
+ },
722
+ "indexes": {},
723
+ "foreignKeys": {},
724
+ "compositePrimaryKeys": {},
725
+ "uniqueConstraints": {},
726
+ "policies": {},
727
+ "checkConstraints": {
728
+ "email_suppressions_reason": {
729
+ "name": "email_suppressions_reason",
730
+ "value": "\"email_suppressions\".\"reason\" IN ('hard_bounce', 'complaint')"
731
+ }
732
+ },
733
+ "isRLSEnabled": false
734
+ },
735
+ "public.events": {
736
+ "name": "events",
737
+ "schema": "",
738
+ "columns": {
739
+ "seq": {
740
+ "name": "seq",
741
+ "type": "bigserial",
742
+ "primaryKey": true,
743
+ "notNull": true
744
+ },
745
+ "id": {
746
+ "name": "id",
747
+ "type": "text",
748
+ "primaryKey": false,
749
+ "notNull": true
750
+ },
751
+ "type": {
752
+ "name": "type",
753
+ "type": "text",
754
+ "primaryKey": false,
755
+ "notNull": true
756
+ },
757
+ "envelope": {
758
+ "name": "envelope",
759
+ "type": "jsonb",
760
+ "primaryKey": false,
761
+ "notNull": true
762
+ },
763
+ "correlation_id": {
764
+ "name": "correlation_id",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": true
768
+ },
769
+ "created_at": {
770
+ "name": "created_at",
771
+ "type": "timestamp with time zone",
772
+ "primaryKey": false,
773
+ "notNull": true
774
+ },
775
+ "subject_type": {
776
+ "name": "subject_type",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": false
780
+ },
781
+ "subject_id": {
782
+ "name": "subject_id",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": false
786
+ },
787
+ "delivered_at": {
788
+ "name": "delivered_at",
789
+ "type": "timestamp with time zone",
790
+ "primaryKey": false,
791
+ "notNull": false
792
+ },
793
+ "attempts": {
794
+ "name": "attempts",
795
+ "type": "integer",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "default": 0
799
+ },
800
+ "dead_at": {
801
+ "name": "dead_at",
802
+ "type": "timestamp with time zone",
803
+ "primaryKey": false,
804
+ "notNull": false
805
+ },
806
+ "retry_at": {
807
+ "name": "retry_at",
808
+ "type": "timestamp with time zone",
809
+ "primaryKey": false,
810
+ "notNull": false
811
+ }
812
+ },
813
+ "indexes": {
814
+ "events_id_unique": {
815
+ "name": "events_id_unique",
816
+ "columns": [
817
+ {
818
+ "expression": "id",
819
+ "isExpression": false,
820
+ "asc": true,
821
+ "nulls": "last"
822
+ }
823
+ ],
824
+ "isUnique": true,
825
+ "concurrently": false,
826
+ "method": "btree",
827
+ "with": {}
828
+ },
829
+ "events_undelivered_idx": {
830
+ "name": "events_undelivered_idx",
831
+ "columns": [
832
+ {
833
+ "expression": "delivered_at",
834
+ "isExpression": false,
835
+ "asc": true,
836
+ "nulls": "last"
837
+ },
838
+ {
839
+ "expression": "seq",
840
+ "isExpression": false,
841
+ "asc": true,
842
+ "nulls": "last"
843
+ }
844
+ ],
845
+ "isUnique": false,
846
+ "concurrently": false,
847
+ "method": "btree",
848
+ "with": {}
849
+ },
850
+ "events_correlation_idx": {
851
+ "name": "events_correlation_idx",
852
+ "columns": [
853
+ {
854
+ "expression": "correlation_id",
855
+ "isExpression": false,
856
+ "asc": true,
857
+ "nulls": "last"
858
+ },
859
+ {
860
+ "expression": "seq",
861
+ "isExpression": false,
862
+ "asc": true,
863
+ "nulls": "last"
864
+ }
865
+ ],
866
+ "isUnique": false,
867
+ "concurrently": false,
868
+ "method": "btree",
869
+ "with": {}
870
+ },
871
+ "events_catch_up_idx": {
872
+ "name": "events_catch_up_idx",
873
+ "columns": [
874
+ {
875
+ "expression": "dead_at",
876
+ "isExpression": false,
877
+ "asc": true,
878
+ "nulls": "last"
879
+ },
880
+ {
881
+ "expression": "delivered_at",
882
+ "isExpression": false,
883
+ "asc": true,
884
+ "nulls": "last"
885
+ },
886
+ {
887
+ "expression": "seq",
888
+ "isExpression": false,
889
+ "asc": true,
890
+ "nulls": "last"
891
+ }
892
+ ],
893
+ "isUnique": false,
894
+ "concurrently": false,
895
+ "method": "btree",
896
+ "with": {}
897
+ },
898
+ "events_subject_idx": {
899
+ "name": "events_subject_idx",
900
+ "columns": [
901
+ {
902
+ "expression": "subject_type",
903
+ "isExpression": false,
904
+ "asc": true,
905
+ "nulls": "last"
906
+ },
907
+ {
908
+ "expression": "subject_id",
909
+ "isExpression": false,
910
+ "asc": true,
911
+ "nulls": "last"
912
+ },
913
+ {
914
+ "expression": "seq",
915
+ "isExpression": false,
916
+ "asc": true,
917
+ "nulls": "last"
918
+ }
919
+ ],
920
+ "isUnique": false,
921
+ "concurrently": false,
922
+ "method": "btree",
923
+ "with": {}
924
+ }
925
+ },
926
+ "foreignKeys": {},
927
+ "compositePrimaryKeys": {},
928
+ "uniqueConstraints": {},
929
+ "policies": {},
930
+ "checkConstraints": {},
931
+ "isRLSEnabled": false
932
+ },
933
+ "public.inventory_reservations": {
934
+ "name": "inventory_reservations",
935
+ "schema": "",
936
+ "columns": {
937
+ "reservation_id": {
938
+ "name": "reservation_id",
939
+ "type": "text",
940
+ "primaryKey": true,
941
+ "notNull": true
942
+ },
943
+ "variant_id": {
944
+ "name": "variant_id",
945
+ "type": "text",
946
+ "primaryKey": false,
947
+ "notNull": true
948
+ },
949
+ "qty": {
950
+ "name": "qty",
951
+ "type": "integer",
952
+ "primaryKey": false,
953
+ "notNull": true
954
+ },
955
+ "order_ref": {
956
+ "name": "order_ref",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": false
960
+ },
961
+ "expires_at": {
962
+ "name": "expires_at",
963
+ "type": "timestamp with time zone",
964
+ "primaryKey": false,
965
+ "notNull": true
966
+ },
967
+ "created_at": {
968
+ "name": "created_at",
969
+ "type": "timestamp with time zone",
970
+ "primaryKey": false,
971
+ "notNull": true
972
+ }
973
+ },
974
+ "indexes": {
975
+ "inv_reservations_variant_idx": {
976
+ "name": "inv_reservations_variant_idx",
977
+ "columns": [
978
+ {
979
+ "expression": "variant_id",
980
+ "isExpression": false,
981
+ "asc": true,
982
+ "nulls": "last"
983
+ }
984
+ ],
985
+ "isUnique": false,
986
+ "concurrently": false,
987
+ "method": "btree",
988
+ "with": {}
989
+ },
990
+ "inv_reservations_expires_idx": {
991
+ "name": "inv_reservations_expires_idx",
992
+ "columns": [
993
+ {
994
+ "expression": "expires_at",
995
+ "isExpression": false,
996
+ "asc": true,
997
+ "nulls": "last"
998
+ }
999
+ ],
1000
+ "isUnique": false,
1001
+ "concurrently": false,
1002
+ "method": "btree",
1003
+ "with": {}
1004
+ }
1005
+ },
1006
+ "foreignKeys": {},
1007
+ "compositePrimaryKeys": {},
1008
+ "uniqueConstraints": {},
1009
+ "policies": {},
1010
+ "checkConstraints": {},
1011
+ "isRLSEnabled": false
1012
+ },
1013
+ "public.order_access_keys": {
1014
+ "name": "order_access_keys",
1015
+ "schema": "",
1016
+ "columns": {
1017
+ "id": {
1018
+ "name": "id",
1019
+ "type": "text",
1020
+ "primaryKey": true,
1021
+ "notNull": true
1022
+ },
1023
+ "order_id": {
1024
+ "name": "order_id",
1025
+ "type": "text",
1026
+ "primaryKey": false,
1027
+ "notNull": true
1028
+ },
1029
+ "key_hash": {
1030
+ "name": "key_hash",
1031
+ "type": "text",
1032
+ "primaryKey": false,
1033
+ "notNull": true
1034
+ },
1035
+ "purpose": {
1036
+ "name": "purpose",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true
1040
+ },
1041
+ "created_at": {
1042
+ "name": "created_at",
1043
+ "type": "timestamp with time zone",
1044
+ "primaryKey": false,
1045
+ "notNull": true
1046
+ },
1047
+ "expires_at": {
1048
+ "name": "expires_at",
1049
+ "type": "timestamp with time zone",
1050
+ "primaryKey": false,
1051
+ "notNull": true
1052
+ }
1053
+ },
1054
+ "indexes": {
1055
+ "order_access_keys_key_hash_idx": {
1056
+ "name": "order_access_keys_key_hash_idx",
1057
+ "columns": [
1058
+ {
1059
+ "expression": "key_hash",
1060
+ "isExpression": false,
1061
+ "asc": true,
1062
+ "nulls": "last"
1063
+ }
1064
+ ],
1065
+ "isUnique": true,
1066
+ "concurrently": false,
1067
+ "method": "btree",
1068
+ "with": {}
1069
+ },
1070
+ "order_access_keys_order_idx": {
1071
+ "name": "order_access_keys_order_idx",
1072
+ "columns": [
1073
+ {
1074
+ "expression": "order_id",
1075
+ "isExpression": false,
1076
+ "asc": true,
1077
+ "nulls": "last"
1078
+ }
1079
+ ],
1080
+ "isUnique": false,
1081
+ "concurrently": false,
1082
+ "method": "btree",
1083
+ "with": {}
1084
+ }
1085
+ },
1086
+ "foreignKeys": {},
1087
+ "compositePrimaryKeys": {},
1088
+ "uniqueConstraints": {},
1089
+ "policies": {},
1090
+ "checkConstraints": {},
1091
+ "isRLSEnabled": false
1092
+ },
1093
+ "public.order_history": {
1094
+ "name": "order_history",
1095
+ "schema": "",
1096
+ "columns": {
1097
+ "id": {
1098
+ "name": "id",
1099
+ "type": "text",
1100
+ "primaryKey": true,
1101
+ "notNull": true
1102
+ },
1103
+ "order_id": {
1104
+ "name": "order_id",
1105
+ "type": "text",
1106
+ "primaryKey": false,
1107
+ "notNull": true
1108
+ },
1109
+ "from_status": {
1110
+ "name": "from_status",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": false
1114
+ },
1115
+ "to_status": {
1116
+ "name": "to_status",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": true
1120
+ },
1121
+ "actor": {
1122
+ "name": "actor",
1123
+ "type": "text",
1124
+ "primaryKey": false,
1125
+ "notNull": true
1126
+ },
1127
+ "note": {
1128
+ "name": "note",
1129
+ "type": "text",
1130
+ "primaryKey": false,
1131
+ "notNull": true,
1132
+ "default": "''"
1133
+ },
1134
+ "timestamp": {
1135
+ "name": "timestamp",
1136
+ "type": "timestamp with time zone",
1137
+ "primaryKey": false,
1138
+ "notNull": true
1139
+ }
1140
+ },
1141
+ "indexes": {
1142
+ "order_history_order_idx": {
1143
+ "name": "order_history_order_idx",
1144
+ "columns": [
1145
+ {
1146
+ "expression": "order_id",
1147
+ "isExpression": false,
1148
+ "asc": true,
1149
+ "nulls": "last"
1150
+ }
1151
+ ],
1152
+ "isUnique": false,
1153
+ "concurrently": false,
1154
+ "method": "btree",
1155
+ "with": {}
1156
+ }
1157
+ },
1158
+ "foreignKeys": {},
1159
+ "compositePrimaryKeys": {},
1160
+ "uniqueConstraints": {},
1161
+ "policies": {},
1162
+ "checkConstraints": {},
1163
+ "isRLSEnabled": false
1164
+ },
1165
+ "public.order_refunds": {
1166
+ "name": "order_refunds",
1167
+ "schema": "",
1168
+ "columns": {
1169
+ "id": {
1170
+ "name": "id",
1171
+ "type": "text",
1172
+ "primaryKey": true,
1173
+ "notNull": true
1174
+ },
1175
+ "order_id": {
1176
+ "name": "order_id",
1177
+ "type": "text",
1178
+ "primaryKey": false,
1179
+ "notNull": true
1180
+ },
1181
+ "amount_minor": {
1182
+ "name": "amount_minor",
1183
+ "type": "integer",
1184
+ "primaryKey": false,
1185
+ "notNull": true
1186
+ },
1187
+ "currency": {
1188
+ "name": "currency",
1189
+ "type": "text",
1190
+ "primaryKey": false,
1191
+ "notNull": true
1192
+ },
1193
+ "provider_refund_id": {
1194
+ "name": "provider_refund_id",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": false
1198
+ },
1199
+ "status": {
1200
+ "name": "status",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": true,
1204
+ "default": "'pending'"
1205
+ },
1206
+ "reason": {
1207
+ "name": "reason",
1208
+ "type": "text",
1209
+ "primaryKey": false,
1210
+ "notNull": false
1211
+ },
1212
+ "actor": {
1213
+ "name": "actor",
1214
+ "type": "text",
1215
+ "primaryKey": false,
1216
+ "notNull": true
1217
+ },
1218
+ "created_at": {
1219
+ "name": "created_at",
1220
+ "type": "timestamp with time zone",
1221
+ "primaryKey": false,
1222
+ "notNull": true
1223
+ },
1224
+ "request_id": {
1225
+ "name": "request_id",
1226
+ "type": "text",
1227
+ "primaryKey": false,
1228
+ "notNull": false
1229
+ }
1230
+ },
1231
+ "indexes": {
1232
+ "order_refunds_order_idx": {
1233
+ "name": "order_refunds_order_idx",
1234
+ "columns": [
1235
+ {
1236
+ "expression": "order_id",
1237
+ "isExpression": false,
1238
+ "asc": true,
1239
+ "nulls": "last"
1240
+ }
1241
+ ],
1242
+ "isUnique": false,
1243
+ "concurrently": false,
1244
+ "method": "btree",
1245
+ "with": {}
1246
+ },
1247
+ "order_refunds_order_request_idx": {
1248
+ "name": "order_refunds_order_request_idx",
1249
+ "columns": [
1250
+ {
1251
+ "expression": "order_id",
1252
+ "isExpression": false,
1253
+ "asc": true,
1254
+ "nulls": "last"
1255
+ },
1256
+ {
1257
+ "expression": "request_id",
1258
+ "isExpression": false,
1259
+ "asc": true,
1260
+ "nulls": "last"
1261
+ }
1262
+ ],
1263
+ "isUnique": true,
1264
+ "concurrently": false,
1265
+ "method": "btree",
1266
+ "with": {}
1267
+ }
1268
+ },
1269
+ "foreignKeys": {},
1270
+ "compositePrimaryKeys": {},
1271
+ "uniqueConstraints": {},
1272
+ "policies": {},
1273
+ "checkConstraints": {},
1274
+ "isRLSEnabled": false
1275
+ },
1276
+ "public.order_sequences": {
1277
+ "name": "order_sequences",
1278
+ "schema": "",
1279
+ "columns": {
1280
+ "id": {
1281
+ "name": "id",
1282
+ "type": "integer",
1283
+ "primaryKey": true,
1284
+ "notNull": true
1285
+ },
1286
+ "next_value": {
1287
+ "name": "next_value",
1288
+ "type": "integer",
1289
+ "primaryKey": false,
1290
+ "notNull": true
1291
+ }
1292
+ },
1293
+ "indexes": {},
1294
+ "foreignKeys": {},
1295
+ "compositePrimaryKeys": {},
1296
+ "uniqueConstraints": {},
1297
+ "policies": {},
1298
+ "checkConstraints": {},
1299
+ "isRLSEnabled": false
1300
+ },
1301
+ "public.order_shipments": {
1302
+ "name": "order_shipments",
1303
+ "schema": "",
1304
+ "columns": {
1305
+ "order_id": {
1306
+ "name": "order_id",
1307
+ "type": "text",
1308
+ "primaryKey": true,
1309
+ "notNull": true
1310
+ },
1311
+ "carrier": {
1312
+ "name": "carrier",
1313
+ "type": "text",
1314
+ "primaryKey": false,
1315
+ "notNull": true
1316
+ },
1317
+ "tracking_number": {
1318
+ "name": "tracking_number",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": true
1322
+ },
1323
+ "created_at": {
1324
+ "name": "created_at",
1325
+ "type": "timestamp with time zone",
1326
+ "primaryKey": false,
1327
+ "notNull": true
1328
+ }
1329
+ },
1330
+ "indexes": {
1331
+ "order_shipments_tracking_number_idx": {
1332
+ "name": "order_shipments_tracking_number_idx",
1333
+ "columns": [
1334
+ {
1335
+ "expression": "tracking_number",
1336
+ "isExpression": false,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ }
1340
+ ],
1341
+ "isUnique": false,
1342
+ "concurrently": false,
1343
+ "method": "btree",
1344
+ "with": {}
1345
+ }
1346
+ },
1347
+ "foreignKeys": {
1348
+ "order_shipments_order_id_orders_id_fk": {
1349
+ "name": "order_shipments_order_id_orders_id_fk",
1350
+ "tableFrom": "order_shipments",
1351
+ "tableTo": "orders",
1352
+ "columnsFrom": [
1353
+ "order_id"
1354
+ ],
1355
+ "columnsTo": [
1356
+ "id"
1357
+ ],
1358
+ "onDelete": "no action",
1359
+ "onUpdate": "no action"
1360
+ }
1361
+ },
1362
+ "compositePrimaryKeys": {},
1363
+ "uniqueConstraints": {},
1364
+ "policies": {},
1365
+ "checkConstraints": {},
1366
+ "isRLSEnabled": false
1367
+ },
1368
+ "public.orders": {
1369
+ "name": "orders",
1370
+ "schema": "",
1371
+ "columns": {
1372
+ "id": {
1373
+ "name": "id",
1374
+ "type": "text",
1375
+ "primaryKey": true,
1376
+ "notNull": true
1377
+ },
1378
+ "order_number": {
1379
+ "name": "order_number",
1380
+ "type": "text",
1381
+ "primaryKey": false,
1382
+ "notNull": true
1383
+ },
1384
+ "sequence": {
1385
+ "name": "sequence",
1386
+ "type": "integer",
1387
+ "primaryKey": false,
1388
+ "notNull": true
1389
+ },
1390
+ "customer_id": {
1391
+ "name": "customer_id",
1392
+ "type": "text",
1393
+ "primaryKey": false,
1394
+ "notNull": false
1395
+ },
1396
+ "status": {
1397
+ "name": "status",
1398
+ "type": "text",
1399
+ "primaryKey": false,
1400
+ "notNull": true,
1401
+ "default": "'pending'"
1402
+ },
1403
+ "email": {
1404
+ "name": "email",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": true
1408
+ },
1409
+ "billing_address": {
1410
+ "name": "billing_address",
1411
+ "type": "jsonb",
1412
+ "primaryKey": false,
1413
+ "notNull": true
1414
+ },
1415
+ "shipping_address": {
1416
+ "name": "shipping_address",
1417
+ "type": "jsonb",
1418
+ "primaryKey": false,
1419
+ "notNull": true
1420
+ },
1421
+ "line_items": {
1422
+ "name": "line_items",
1423
+ "type": "jsonb",
1424
+ "primaryKey": false,
1425
+ "notNull": true
1426
+ },
1427
+ "subtotal_minor": {
1428
+ "name": "subtotal_minor",
1429
+ "type": "integer",
1430
+ "primaryKey": false,
1431
+ "notNull": true
1432
+ },
1433
+ "tax_total_minor": {
1434
+ "name": "tax_total_minor",
1435
+ "type": "integer",
1436
+ "primaryKey": false,
1437
+ "notNull": true,
1438
+ "default": 0
1439
+ },
1440
+ "shipping_total_minor": {
1441
+ "name": "shipping_total_minor",
1442
+ "type": "integer",
1443
+ "primaryKey": false,
1444
+ "notNull": true,
1445
+ "default": 0
1446
+ },
1447
+ "discount_total_minor": {
1448
+ "name": "discount_total_minor",
1449
+ "type": "integer",
1450
+ "primaryKey": false,
1451
+ "notNull": true,
1452
+ "default": 0
1453
+ },
1454
+ "total_minor": {
1455
+ "name": "total_minor",
1456
+ "type": "integer",
1457
+ "primaryKey": false,
1458
+ "notNull": true
1459
+ },
1460
+ "currency": {
1461
+ "name": "currency",
1462
+ "type": "text",
1463
+ "primaryKey": false,
1464
+ "notNull": true
1465
+ },
1466
+ "notes": {
1467
+ "name": "notes",
1468
+ "type": "text",
1469
+ "primaryKey": false,
1470
+ "notNull": true,
1471
+ "default": "''"
1472
+ },
1473
+ "metadata": {
1474
+ "name": "metadata",
1475
+ "type": "jsonb",
1476
+ "primaryKey": false,
1477
+ "notNull": true,
1478
+ "default": "'{}'::jsonb"
1479
+ },
1480
+ "payment_intent_id": {
1481
+ "name": "payment_intent_id",
1482
+ "type": "text",
1483
+ "primaryKey": false,
1484
+ "notNull": false
1485
+ },
1486
+ "cart_token": {
1487
+ "name": "cart_token",
1488
+ "type": "text",
1489
+ "primaryKey": false,
1490
+ "notNull": false
1491
+ },
1492
+ "captured_minor": {
1493
+ "name": "captured_minor",
1494
+ "type": "integer",
1495
+ "primaryKey": false,
1496
+ "notNull": true,
1497
+ "default": 0
1498
+ },
1499
+ "captured_at": {
1500
+ "name": "captured_at",
1501
+ "type": "timestamp with time zone",
1502
+ "primaryKey": false,
1503
+ "notNull": false
1504
+ },
1505
+ "refunded_minor": {
1506
+ "name": "refunded_minor",
1507
+ "type": "integer",
1508
+ "primaryKey": false,
1509
+ "notNull": true,
1510
+ "default": 0
1511
+ },
1512
+ "capture_method": {
1513
+ "name": "capture_method",
1514
+ "type": "text",
1515
+ "primaryKey": false,
1516
+ "notNull": false
1517
+ },
1518
+ "source": {
1519
+ "name": "source",
1520
+ "type": "text COLLATE \"C\"",
1521
+ "primaryKey": false,
1522
+ "notNull": true,
1523
+ "default": "'storefront'"
1524
+ },
1525
+ "created_at": {
1526
+ "name": "created_at",
1527
+ "type": "timestamp with time zone",
1528
+ "primaryKey": false,
1529
+ "notNull": true
1530
+ },
1531
+ "updated_at": {
1532
+ "name": "updated_at",
1533
+ "type": "timestamp with time zone",
1534
+ "primaryKey": false,
1535
+ "notNull": true
1536
+ }
1537
+ },
1538
+ "indexes": {
1539
+ "orders_number_unique": {
1540
+ "name": "orders_number_unique",
1541
+ "columns": [
1542
+ {
1543
+ "expression": "order_number",
1544
+ "isExpression": false,
1545
+ "asc": true,
1546
+ "nulls": "last"
1547
+ }
1548
+ ],
1549
+ "isUnique": true,
1550
+ "concurrently": false,
1551
+ "method": "btree",
1552
+ "with": {}
1553
+ },
1554
+ "orders_sequence_unique": {
1555
+ "name": "orders_sequence_unique",
1556
+ "columns": [
1557
+ {
1558
+ "expression": "sequence",
1559
+ "isExpression": false,
1560
+ "asc": true,
1561
+ "nulls": "last"
1562
+ }
1563
+ ],
1564
+ "isUnique": true,
1565
+ "concurrently": false,
1566
+ "method": "btree",
1567
+ "with": {}
1568
+ },
1569
+ "orders_customer_idx": {
1570
+ "name": "orders_customer_idx",
1571
+ "columns": [
1572
+ {
1573
+ "expression": "customer_id",
1574
+ "isExpression": false,
1575
+ "asc": true,
1576
+ "nulls": "last"
1577
+ }
1578
+ ],
1579
+ "isUnique": false,
1580
+ "concurrently": false,
1581
+ "method": "btree",
1582
+ "with": {}
1583
+ },
1584
+ "orders_status_idx": {
1585
+ "name": "orders_status_idx",
1586
+ "columns": [
1587
+ {
1588
+ "expression": "status",
1589
+ "isExpression": false,
1590
+ "asc": true,
1591
+ "nulls": "last"
1592
+ }
1593
+ ],
1594
+ "isUnique": false,
1595
+ "concurrently": false,
1596
+ "method": "btree",
1597
+ "with": {}
1598
+ },
1599
+ "orders_payment_intent_idx": {
1600
+ "name": "orders_payment_intent_idx",
1601
+ "columns": [
1602
+ {
1603
+ "expression": "payment_intent_id",
1604
+ "isExpression": false,
1605
+ "asc": true,
1606
+ "nulls": "last"
1607
+ }
1608
+ ],
1609
+ "isUnique": false,
1610
+ "concurrently": false,
1611
+ "method": "btree",
1612
+ "with": {}
1613
+ },
1614
+ "orders_source_created_idx": {
1615
+ "name": "orders_source_created_idx",
1616
+ "columns": [
1617
+ {
1618
+ "expression": "source",
1619
+ "isExpression": false,
1620
+ "asc": true,
1621
+ "nulls": "last"
1622
+ },
1623
+ {
1624
+ "expression": "created_at",
1625
+ "isExpression": false,
1626
+ "asc": true,
1627
+ "nulls": "last"
1628
+ }
1629
+ ],
1630
+ "isUnique": false,
1631
+ "concurrently": false,
1632
+ "method": "btree",
1633
+ "with": {}
1634
+ },
1635
+ "orders_pending_cart_unique": {
1636
+ "name": "orders_pending_cart_unique",
1637
+ "columns": [
1638
+ {
1639
+ "expression": "cart_token",
1640
+ "isExpression": false,
1641
+ "asc": true,
1642
+ "nulls": "last"
1643
+ }
1644
+ ],
1645
+ "isUnique": true,
1646
+ "where": "status = 'pending'",
1647
+ "concurrently": false,
1648
+ "method": "btree",
1649
+ "with": {}
1650
+ }
1651
+ },
1652
+ "foreignKeys": {},
1653
+ "compositePrimaryKeys": {},
1654
+ "uniqueConstraints": {},
1655
+ "policies": {},
1656
+ "checkConstraints": {},
1657
+ "isRLSEnabled": false
1658
+ },
1659
+ "public.processed_events": {
1660
+ "name": "processed_events",
1661
+ "schema": "",
1662
+ "columns": {
1663
+ "handler_name": {
1664
+ "name": "handler_name",
1665
+ "type": "text",
1666
+ "primaryKey": false,
1667
+ "notNull": true
1668
+ },
1669
+ "event_id": {
1670
+ "name": "event_id",
1671
+ "type": "text",
1672
+ "primaryKey": false,
1673
+ "notNull": true
1674
+ },
1675
+ "processed_at": {
1676
+ "name": "processed_at",
1677
+ "type": "timestamp with time zone",
1678
+ "primaryKey": false,
1679
+ "notNull": true
1680
+ }
1681
+ },
1682
+ "indexes": {},
1683
+ "foreignKeys": {},
1684
+ "compositePrimaryKeys": {
1685
+ "processed_events_handler_name_event_id_pk": {
1686
+ "name": "processed_events_handler_name_event_id_pk",
1687
+ "columns": [
1688
+ "handler_name",
1689
+ "event_id"
1690
+ ]
1691
+ }
1692
+ },
1693
+ "uniqueConstraints": {},
1694
+ "policies": {},
1695
+ "checkConstraints": {},
1696
+ "isRLSEnabled": false
1697
+ },
1698
+ "public.product_categories": {
1699
+ "name": "product_categories",
1700
+ "schema": "",
1701
+ "columns": {
1702
+ "product_id": {
1703
+ "name": "product_id",
1704
+ "type": "text",
1705
+ "primaryKey": false,
1706
+ "notNull": true
1707
+ },
1708
+ "category_id": {
1709
+ "name": "category_id",
1710
+ "type": "text",
1711
+ "primaryKey": false,
1712
+ "notNull": true
1713
+ }
1714
+ },
1715
+ "indexes": {
1716
+ "product_categories_category_idx": {
1717
+ "name": "product_categories_category_idx",
1718
+ "columns": [
1719
+ {
1720
+ "expression": "category_id",
1721
+ "isExpression": false,
1722
+ "asc": true,
1723
+ "nulls": "last"
1724
+ }
1725
+ ],
1726
+ "isUnique": false,
1727
+ "concurrently": false,
1728
+ "method": "btree",
1729
+ "with": {}
1730
+ }
1731
+ },
1732
+ "foreignKeys": {},
1733
+ "compositePrimaryKeys": {
1734
+ "product_categories_product_id_category_id_pk": {
1735
+ "name": "product_categories_product_id_category_id_pk",
1736
+ "columns": [
1737
+ "product_id",
1738
+ "category_id"
1739
+ ]
1740
+ }
1741
+ },
1742
+ "uniqueConstraints": {},
1743
+ "policies": {},
1744
+ "checkConstraints": {},
1745
+ "isRLSEnabled": false
1746
+ },
1747
+ "public.products": {
1748
+ "name": "products",
1749
+ "schema": "",
1750
+ "columns": {
1751
+ "id": {
1752
+ "name": "id",
1753
+ "type": "text",
1754
+ "primaryKey": true,
1755
+ "notNull": true
1756
+ },
1757
+ "slug": {
1758
+ "name": "slug",
1759
+ "type": "text",
1760
+ "primaryKey": false,
1761
+ "notNull": true
1762
+ },
1763
+ "name": {
1764
+ "name": "name",
1765
+ "type": "text",
1766
+ "primaryKey": false,
1767
+ "notNull": true
1768
+ },
1769
+ "description": {
1770
+ "name": "description",
1771
+ "type": "text",
1772
+ "primaryKey": false,
1773
+ "notNull": true,
1774
+ "default": "''"
1775
+ },
1776
+ "short_description": {
1777
+ "name": "short_description",
1778
+ "type": "text",
1779
+ "primaryKey": false,
1780
+ "notNull": true,
1781
+ "default": "''"
1782
+ },
1783
+ "status": {
1784
+ "name": "status",
1785
+ "type": "text",
1786
+ "primaryKey": false,
1787
+ "notNull": true,
1788
+ "default": "'draft'"
1789
+ },
1790
+ "type": {
1791
+ "name": "type",
1792
+ "type": "text",
1793
+ "primaryKey": false,
1794
+ "notNull": true,
1795
+ "default": "'simple'"
1796
+ },
1797
+ "seo_title": {
1798
+ "name": "seo_title",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": true,
1802
+ "default": "''"
1803
+ },
1804
+ "seo_description": {
1805
+ "name": "seo_description",
1806
+ "type": "text",
1807
+ "primaryKey": false,
1808
+ "notNull": true,
1809
+ "default": "''"
1810
+ },
1811
+ "media": {
1812
+ "name": "media",
1813
+ "type": "jsonb",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "default": "'[]'::jsonb"
1817
+ },
1818
+ "metadata": {
1819
+ "name": "metadata",
1820
+ "type": "jsonb",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "default": "'{}'::jsonb"
1824
+ },
1825
+ "created_at": {
1826
+ "name": "created_at",
1827
+ "type": "timestamp with time zone",
1828
+ "primaryKey": false,
1829
+ "notNull": true
1830
+ },
1831
+ "updated_at": {
1832
+ "name": "updated_at",
1833
+ "type": "timestamp with time zone",
1834
+ "primaryKey": false,
1835
+ "notNull": true
1836
+ }
1837
+ },
1838
+ "indexes": {
1839
+ "products_slug_unique": {
1840
+ "name": "products_slug_unique",
1841
+ "columns": [
1842
+ {
1843
+ "expression": "slug",
1844
+ "isExpression": false,
1845
+ "asc": true,
1846
+ "nulls": "last"
1847
+ }
1848
+ ],
1849
+ "isUnique": true,
1850
+ "concurrently": false,
1851
+ "method": "btree",
1852
+ "with": {}
1853
+ },
1854
+ "products_status_idx": {
1855
+ "name": "products_status_idx",
1856
+ "columns": [
1857
+ {
1858
+ "expression": "status",
1859
+ "isExpression": false,
1860
+ "asc": true,
1861
+ "nulls": "last"
1862
+ }
1863
+ ],
1864
+ "isUnique": false,
1865
+ "concurrently": false,
1866
+ "method": "btree",
1867
+ "with": {}
1868
+ }
1869
+ },
1870
+ "foreignKeys": {},
1871
+ "compositePrimaryKeys": {},
1872
+ "uniqueConstraints": {},
1873
+ "policies": {},
1874
+ "checkConstraints": {},
1875
+ "isRLSEnabled": false
1876
+ },
1877
+ "public.proposals": {
1878
+ "name": "proposals",
1879
+ "schema": "",
1880
+ "columns": {
1881
+ "id": {
1882
+ "name": "id",
1883
+ "type": "text",
1884
+ "primaryKey": true,
1885
+ "notNull": true
1886
+ },
1887
+ "tool": {
1888
+ "name": "tool",
1889
+ "type": "text",
1890
+ "primaryKey": false,
1891
+ "notNull": true
1892
+ },
1893
+ "command": {
1894
+ "name": "command",
1895
+ "type": "text",
1896
+ "primaryKey": false,
1897
+ "notNull": true
1898
+ },
1899
+ "args": {
1900
+ "name": "args",
1901
+ "type": "jsonb",
1902
+ "primaryKey": false,
1903
+ "notNull": true
1904
+ },
1905
+ "handles": {
1906
+ "name": "handles",
1907
+ "type": "jsonb",
1908
+ "primaryKey": false,
1909
+ "notNull": false
1910
+ },
1911
+ "idempotency_key": {
1912
+ "name": "idempotency_key",
1913
+ "type": "text",
1914
+ "primaryKey": false,
1915
+ "notNull": false
1916
+ },
1917
+ "proposer_id": {
1918
+ "name": "proposer_id",
1919
+ "type": "text",
1920
+ "primaryKey": false,
1921
+ "notNull": false
1922
+ },
1923
+ "agent_name": {
1924
+ "name": "agent_name",
1925
+ "type": "text",
1926
+ "primaryKey": false,
1927
+ "notNull": true
1928
+ },
1929
+ "agent_version": {
1930
+ "name": "agent_version",
1931
+ "type": "text",
1932
+ "primaryKey": false,
1933
+ "notNull": false
1934
+ },
1935
+ "correlation_id": {
1936
+ "name": "correlation_id",
1937
+ "type": "text",
1938
+ "primaryKey": false,
1939
+ "notNull": true
1940
+ },
1941
+ "status": {
1942
+ "name": "status",
1943
+ "type": "text",
1944
+ "primaryKey": false,
1945
+ "notNull": true
1946
+ },
1947
+ "decided_by_kind": {
1948
+ "name": "decided_by_kind",
1949
+ "type": "text",
1950
+ "primaryKey": false,
1951
+ "notNull": false
1952
+ },
1953
+ "decided_by": {
1954
+ "name": "decided_by",
1955
+ "type": "text",
1956
+ "primaryKey": false,
1957
+ "notNull": false
1958
+ },
1959
+ "decided_at": {
1960
+ "name": "decided_at",
1961
+ "type": "timestamp with time zone",
1962
+ "primaryKey": false,
1963
+ "notNull": false
1964
+ },
1965
+ "reason": {
1966
+ "name": "reason",
1967
+ "type": "text",
1968
+ "primaryKey": false,
1969
+ "notNull": false
1970
+ },
1971
+ "outcome_status": {
1972
+ "name": "outcome_status",
1973
+ "type": "integer",
1974
+ "primaryKey": false,
1975
+ "notNull": false
1976
+ },
1977
+ "outcome_code": {
1978
+ "name": "outcome_code",
1979
+ "type": "text",
1980
+ "primaryKey": false,
1981
+ "notNull": false
1982
+ },
1983
+ "outcome_message": {
1984
+ "name": "outcome_message",
1985
+ "type": "text",
1986
+ "primaryKey": false,
1987
+ "notNull": false
1988
+ },
1989
+ "created_at": {
1990
+ "name": "created_at",
1991
+ "type": "timestamp with time zone",
1992
+ "primaryKey": false,
1993
+ "notNull": true
1994
+ },
1995
+ "settled_at": {
1996
+ "name": "settled_at",
1997
+ "type": "timestamp with time zone",
1998
+ "primaryKey": false,
1999
+ "notNull": false
2000
+ }
2001
+ },
2002
+ "indexes": {
2003
+ "proposals_key_unique": {
2004
+ "name": "proposals_key_unique",
2005
+ "columns": [
2006
+ {
2007
+ "expression": "proposer_id",
2008
+ "isExpression": false,
2009
+ "asc": true,
2010
+ "nulls": "last"
2011
+ },
2012
+ {
2013
+ "expression": "tool",
2014
+ "isExpression": false,
2015
+ "asc": true,
2016
+ "nulls": "last"
2017
+ },
2018
+ {
2019
+ "expression": "idempotency_key",
2020
+ "isExpression": false,
2021
+ "asc": true,
2022
+ "nulls": "last"
2023
+ }
2024
+ ],
2025
+ "isUnique": true,
2026
+ "where": "\"proposals\".\"proposer_id\" IS NOT NULL AND \"proposals\".\"idempotency_key\" IS NOT NULL",
2027
+ "concurrently": false,
2028
+ "method": "btree",
2029
+ "with": {}
2030
+ },
2031
+ "proposals_created_idx": {
2032
+ "name": "proposals_created_idx",
2033
+ "columns": [
2034
+ {
2035
+ "expression": "created_at",
2036
+ "isExpression": false,
2037
+ "asc": true,
2038
+ "nulls": "last"
2039
+ },
2040
+ {
2041
+ "expression": "id",
2042
+ "isExpression": false,
2043
+ "asc": true,
2044
+ "nulls": "last"
2045
+ }
2046
+ ],
2047
+ "isUnique": false,
2048
+ "concurrently": false,
2049
+ "method": "btree",
2050
+ "with": {}
2051
+ },
2052
+ "proposals_status_idx": {
2053
+ "name": "proposals_status_idx",
2054
+ "columns": [
2055
+ {
2056
+ "expression": "status",
2057
+ "isExpression": false,
2058
+ "asc": true,
2059
+ "nulls": "last"
2060
+ },
2061
+ {
2062
+ "expression": "created_at",
2063
+ "isExpression": false,
2064
+ "asc": true,
2065
+ "nulls": "last"
2066
+ },
2067
+ {
2068
+ "expression": "id",
2069
+ "isExpression": false,
2070
+ "asc": true,
2071
+ "nulls": "last"
2072
+ }
2073
+ ],
2074
+ "isUnique": false,
2075
+ "concurrently": false,
2076
+ "method": "btree",
2077
+ "with": {}
2078
+ }
2079
+ },
2080
+ "foreignKeys": {},
2081
+ "compositePrimaryKeys": {},
2082
+ "uniqueConstraints": {},
2083
+ "policies": {},
2084
+ "checkConstraints": {
2085
+ "proposals_status": {
2086
+ "name": "proposals_status",
2087
+ "value": "\"proposals\".\"status\" IN ('pending', 'approved', 'rejected', 'applied', 'failed')"
2088
+ }
2089
+ },
2090
+ "isRLSEnabled": false
2091
+ },
2092
+ "public.refresh_tokens": {
2093
+ "name": "refresh_tokens",
2094
+ "schema": "",
2095
+ "columns": {
2096
+ "id": {
2097
+ "name": "id",
2098
+ "type": "text",
2099
+ "primaryKey": true,
2100
+ "notNull": true
2101
+ },
2102
+ "customer_id": {
2103
+ "name": "customer_id",
2104
+ "type": "text",
2105
+ "primaryKey": false,
2106
+ "notNull": true
2107
+ },
2108
+ "token_hash": {
2109
+ "name": "token_hash",
2110
+ "type": "text",
2111
+ "primaryKey": false,
2112
+ "notNull": true
2113
+ },
2114
+ "revoked_at": {
2115
+ "name": "revoked_at",
2116
+ "type": "timestamp with time zone",
2117
+ "primaryKey": false,
2118
+ "notNull": false
2119
+ },
2120
+ "replaced_by_jti": {
2121
+ "name": "replaced_by_jti",
2122
+ "type": "text",
2123
+ "primaryKey": false,
2124
+ "notNull": false
2125
+ },
2126
+ "expires_at": {
2127
+ "name": "expires_at",
2128
+ "type": "timestamp with time zone",
2129
+ "primaryKey": false,
2130
+ "notNull": true
2131
+ },
2132
+ "created_at": {
2133
+ "name": "created_at",
2134
+ "type": "timestamp with time zone",
2135
+ "primaryKey": false,
2136
+ "notNull": true
2137
+ }
2138
+ },
2139
+ "indexes": {
2140
+ "refresh_tokens_customer_idx": {
2141
+ "name": "refresh_tokens_customer_idx",
2142
+ "columns": [
2143
+ {
2144
+ "expression": "customer_id",
2145
+ "isExpression": false,
2146
+ "asc": true,
2147
+ "nulls": "last"
2148
+ }
2149
+ ],
2150
+ "isUnique": false,
2151
+ "concurrently": false,
2152
+ "method": "btree",
2153
+ "with": {}
2154
+ }
2155
+ },
2156
+ "foreignKeys": {},
2157
+ "compositePrimaryKeys": {},
2158
+ "uniqueConstraints": {},
2159
+ "policies": {},
2160
+ "checkConstraints": {},
2161
+ "isRLSEnabled": false
2162
+ },
2163
+ "public.reviews": {
2164
+ "name": "reviews",
2165
+ "schema": "",
2166
+ "columns": {
2167
+ "id": {
2168
+ "name": "id",
2169
+ "type": "text",
2170
+ "primaryKey": true,
2171
+ "notNull": true
2172
+ },
2173
+ "product_id": {
2174
+ "name": "product_id",
2175
+ "type": "text",
2176
+ "primaryKey": false,
2177
+ "notNull": true
2178
+ },
2179
+ "customer_id": {
2180
+ "name": "customer_id",
2181
+ "type": "text",
2182
+ "primaryKey": false,
2183
+ "notNull": false
2184
+ },
2185
+ "order_id": {
2186
+ "name": "order_id",
2187
+ "type": "text",
2188
+ "primaryKey": false,
2189
+ "notNull": false
2190
+ },
2191
+ "rating": {
2192
+ "name": "rating",
2193
+ "type": "integer",
2194
+ "primaryKey": false,
2195
+ "notNull": true
2196
+ },
2197
+ "title": {
2198
+ "name": "title",
2199
+ "type": "text",
2200
+ "primaryKey": false,
2201
+ "notNull": true,
2202
+ "default": "''"
2203
+ },
2204
+ "body": {
2205
+ "name": "body",
2206
+ "type": "text",
2207
+ "primaryKey": false,
2208
+ "notNull": true,
2209
+ "default": "''"
2210
+ },
2211
+ "moderation_status": {
2212
+ "name": "moderation_status",
2213
+ "type": "text",
2214
+ "primaryKey": false,
2215
+ "notNull": true,
2216
+ "default": "'pending'"
2217
+ },
2218
+ "submitted_at": {
2219
+ "name": "submitted_at",
2220
+ "type": "timestamp with time zone",
2221
+ "primaryKey": false,
2222
+ "notNull": true
2223
+ },
2224
+ "moderated_at": {
2225
+ "name": "moderated_at",
2226
+ "type": "timestamp with time zone",
2227
+ "primaryKey": false,
2228
+ "notNull": false
2229
+ },
2230
+ "moderated_by": {
2231
+ "name": "moderated_by",
2232
+ "type": "text",
2233
+ "primaryKey": false,
2234
+ "notNull": false
2235
+ }
2236
+ },
2237
+ "indexes": {
2238
+ "reviews_product_idx": {
2239
+ "name": "reviews_product_idx",
2240
+ "columns": [
2241
+ {
2242
+ "expression": "product_id",
2243
+ "isExpression": false,
2244
+ "asc": true,
2245
+ "nulls": "last"
2246
+ }
2247
+ ],
2248
+ "isUnique": false,
2249
+ "concurrently": false,
2250
+ "method": "btree",
2251
+ "with": {}
2252
+ },
2253
+ "reviews_status_idx": {
2254
+ "name": "reviews_status_idx",
2255
+ "columns": [
2256
+ {
2257
+ "expression": "moderation_status",
2258
+ "isExpression": false,
2259
+ "asc": true,
2260
+ "nulls": "last"
2261
+ }
2262
+ ],
2263
+ "isUnique": false,
2264
+ "concurrently": false,
2265
+ "method": "btree",
2266
+ "with": {}
2267
+ }
2268
+ },
2269
+ "foreignKeys": {},
2270
+ "compositePrimaryKeys": {},
2271
+ "uniqueConstraints": {},
2272
+ "policies": {},
2273
+ "checkConstraints": {},
2274
+ "isRLSEnabled": false
2275
+ },
2276
+ "public.settings": {
2277
+ "name": "settings",
2278
+ "schema": "",
2279
+ "columns": {
2280
+ "slot": {
2281
+ "name": "slot",
2282
+ "type": "text",
2283
+ "primaryKey": false,
2284
+ "notNull": true
2285
+ },
2286
+ "path": {
2287
+ "name": "path",
2288
+ "type": "text",
2289
+ "primaryKey": false,
2290
+ "notNull": true
2291
+ },
2292
+ "ciphertext": {
2293
+ "name": "ciphertext",
2294
+ "type": "bytea",
2295
+ "primaryKey": false,
2296
+ "notNull": false
2297
+ },
2298
+ "plain": {
2299
+ "name": "plain",
2300
+ "type": "text",
2301
+ "primaryKey": false,
2302
+ "notNull": false
2303
+ },
2304
+ "iv": {
2305
+ "name": "iv",
2306
+ "type": "bytea",
2307
+ "primaryKey": false,
2308
+ "notNull": false
2309
+ },
2310
+ "tag": {
2311
+ "name": "tag",
2312
+ "type": "bytea",
2313
+ "primaryKey": false,
2314
+ "notNull": false
2315
+ },
2316
+ "key_id": {
2317
+ "name": "key_id",
2318
+ "type": "text",
2319
+ "primaryKey": false,
2320
+ "notNull": false
2321
+ },
2322
+ "updated_at": {
2323
+ "name": "updated_at",
2324
+ "type": "timestamp with time zone",
2325
+ "primaryKey": false,
2326
+ "notNull": true
2327
+ },
2328
+ "updated_by": {
2329
+ "name": "updated_by",
2330
+ "type": "text",
2331
+ "primaryKey": false,
2332
+ "notNull": false
2333
+ }
2334
+ },
2335
+ "indexes": {},
2336
+ "foreignKeys": {},
2337
+ "compositePrimaryKeys": {
2338
+ "settings_slot_path_pk": {
2339
+ "name": "settings_slot_path_pk",
2340
+ "columns": [
2341
+ "slot",
2342
+ "path"
2343
+ ]
2344
+ }
2345
+ },
2346
+ "uniqueConstraints": {},
2347
+ "policies": {},
2348
+ "checkConstraints": {
2349
+ "settings_one_value": {
2350
+ "name": "settings_one_value",
2351
+ "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))"
2352
+ }
2353
+ },
2354
+ "isRLSEnabled": false
2355
+ },
2356
+ "public.stock_adjustments": {
2357
+ "name": "stock_adjustments",
2358
+ "schema": "",
2359
+ "columns": {
2360
+ "id": {
2361
+ "name": "id",
2362
+ "type": "text",
2363
+ "primaryKey": true,
2364
+ "notNull": true
2365
+ },
2366
+ "variant_id": {
2367
+ "name": "variant_id",
2368
+ "type": "text",
2369
+ "primaryKey": false,
2370
+ "notNull": true
2371
+ },
2372
+ "adjustment": {
2373
+ "name": "adjustment",
2374
+ "type": "integer",
2375
+ "primaryKey": false,
2376
+ "notNull": true
2377
+ },
2378
+ "reason": {
2379
+ "name": "reason",
2380
+ "type": "text",
2381
+ "primaryKey": false,
2382
+ "notNull": true
2383
+ },
2384
+ "actor": {
2385
+ "name": "actor",
2386
+ "type": "text",
2387
+ "primaryKey": false,
2388
+ "notNull": true
2389
+ },
2390
+ "previous_qty": {
2391
+ "name": "previous_qty",
2392
+ "type": "integer",
2393
+ "primaryKey": false,
2394
+ "notNull": true
2395
+ },
2396
+ "new_qty": {
2397
+ "name": "new_qty",
2398
+ "type": "integer",
2399
+ "primaryKey": false,
2400
+ "notNull": true
2401
+ },
2402
+ "timestamp": {
2403
+ "name": "timestamp",
2404
+ "type": "timestamp with time zone",
2405
+ "primaryKey": false,
2406
+ "notNull": true
2407
+ }
2408
+ },
2409
+ "indexes": {
2410
+ "stock_adjustments_variant_idx": {
2411
+ "name": "stock_adjustments_variant_idx",
2412
+ "columns": [
2413
+ {
2414
+ "expression": "variant_id",
2415
+ "isExpression": false,
2416
+ "asc": true,
2417
+ "nulls": "last"
2418
+ }
2419
+ ],
2420
+ "isUnique": false,
2421
+ "concurrently": false,
2422
+ "method": "btree",
2423
+ "with": {}
2424
+ }
2425
+ },
2426
+ "foreignKeys": {},
2427
+ "compositePrimaryKeys": {},
2428
+ "uniqueConstraints": {},
2429
+ "policies": {},
2430
+ "checkConstraints": {},
2431
+ "isRLSEnabled": false
2432
+ },
2433
+ "public.variants": {
2434
+ "name": "variants",
2435
+ "schema": "",
2436
+ "columns": {
2437
+ "id": {
2438
+ "name": "id",
2439
+ "type": "text",
2440
+ "primaryKey": true,
2441
+ "notNull": true
2442
+ },
2443
+ "product_id": {
2444
+ "name": "product_id",
2445
+ "type": "text",
2446
+ "primaryKey": false,
2447
+ "notNull": true
2448
+ },
2449
+ "sku": {
2450
+ "name": "sku",
2451
+ "type": "text",
2452
+ "primaryKey": false,
2453
+ "notNull": true
2454
+ },
2455
+ "name": {
2456
+ "name": "name",
2457
+ "type": "text",
2458
+ "primaryKey": false,
2459
+ "notNull": true,
2460
+ "default": "''"
2461
+ },
2462
+ "price_minor": {
2463
+ "name": "price_minor",
2464
+ "type": "integer",
2465
+ "primaryKey": false,
2466
+ "notNull": true
2467
+ },
2468
+ "compare_at_price_minor": {
2469
+ "name": "compare_at_price_minor",
2470
+ "type": "integer",
2471
+ "primaryKey": false,
2472
+ "notNull": false
2473
+ },
2474
+ "weight_grams": {
2475
+ "name": "weight_grams",
2476
+ "type": "integer",
2477
+ "primaryKey": false,
2478
+ "notNull": false
2479
+ },
2480
+ "dimensions": {
2481
+ "name": "dimensions",
2482
+ "type": "jsonb",
2483
+ "primaryKey": false,
2484
+ "notNull": false
2485
+ },
2486
+ "stock": {
2487
+ "name": "stock",
2488
+ "type": "integer",
2489
+ "primaryKey": false,
2490
+ "notNull": true,
2491
+ "default": 0
2492
+ },
2493
+ "low_stock_threshold": {
2494
+ "name": "low_stock_threshold",
2495
+ "type": "integer",
2496
+ "primaryKey": false,
2497
+ "notNull": true,
2498
+ "default": 0
2499
+ },
2500
+ "options": {
2501
+ "name": "options",
2502
+ "type": "jsonb",
2503
+ "primaryKey": false,
2504
+ "notNull": true,
2505
+ "default": "'[]'::jsonb"
2506
+ },
2507
+ "status": {
2508
+ "name": "status",
2509
+ "type": "text",
2510
+ "primaryKey": false,
2511
+ "notNull": true,
2512
+ "default": "'active'"
2513
+ },
2514
+ "created_at": {
2515
+ "name": "created_at",
2516
+ "type": "timestamp with time zone",
2517
+ "primaryKey": false,
2518
+ "notNull": true
2519
+ },
2520
+ "updated_at": {
2521
+ "name": "updated_at",
2522
+ "type": "timestamp with time zone",
2523
+ "primaryKey": false,
2524
+ "notNull": true
2525
+ }
2526
+ },
2527
+ "indexes": {
2528
+ "variants_sku_unique": {
2529
+ "name": "variants_sku_unique",
2530
+ "columns": [
2531
+ {
2532
+ "expression": "sku",
2533
+ "isExpression": false,
2534
+ "asc": true,
2535
+ "nulls": "last"
2536
+ }
2537
+ ],
2538
+ "isUnique": true,
2539
+ "concurrently": false,
2540
+ "method": "btree",
2541
+ "with": {}
2542
+ },
2543
+ "variants_product_idx": {
2544
+ "name": "variants_product_idx",
2545
+ "columns": [
2546
+ {
2547
+ "expression": "product_id",
2548
+ "isExpression": false,
2549
+ "asc": true,
2550
+ "nulls": "last"
2551
+ }
2552
+ ],
2553
+ "isUnique": false,
2554
+ "concurrently": false,
2555
+ "method": "btree",
2556
+ "with": {}
2557
+ }
2558
+ },
2559
+ "foreignKeys": {},
2560
+ "compositePrimaryKeys": {},
2561
+ "uniqueConstraints": {},
2562
+ "policies": {},
2563
+ "checkConstraints": {},
2564
+ "isRLSEnabled": false
2565
+ }
2566
+ },
2567
+ "enums": {},
2568
+ "schemas": {},
2569
+ "sequences": {},
2570
+ "roles": {},
2571
+ "policies": {},
2572
+ "views": {},
2573
+ "_meta": {
2574
+ "columns": {},
2575
+ "schemas": {},
2576
+ "tables": {}
2577
+ }
2578
+ }