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