@nymbalhq/platform 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{chunk-QN56IB4G.js → chunk-NNDIAIT6.js} +187 -5
  2. package/dist/chunk-NNDIAIT6.js.map +1 -0
  3. package/dist/{chunk-2PLYK5RU.js → chunk-TRLERRUI.js} +3559 -509
  4. package/dist/chunk-TRLERRUI.js.map +1 -0
  5. package/dist/db/schema/index.d.ts +5276 -3224
  6. package/dist/db/schema/index.js +1 -1
  7. package/dist/index.d.ts +428 -81
  8. package/dist/index.js +1200 -2254
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-SBGUI2L5.js +8 -0
  11. package/migrations/postgres/0013_order_access_keys.sql +11 -0
  12. package/migrations/postgres/0014_alert_subscriptions.sql +22 -0
  13. package/migrations/postgres/0015_events_retry_at.sql +1 -0
  14. package/migrations/postgres/0016_email_suppressions.sql +7 -0
  15. package/migrations/postgres/0017_order_shipments.sql +14 -0
  16. package/migrations/postgres/0018_order_key_expiry.sql +8 -0
  17. package/migrations/postgres/meta/0013_snapshot.json +2000 -0
  18. package/migrations/postgres/meta/0014_snapshot.json +2185 -0
  19. package/migrations/postgres/meta/0015_snapshot.json +2191 -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/_journal.json +42 -0
  24. package/migrations/sqlite/0013_order_access_keys.sql +11 -0
  25. package/migrations/sqlite/0014_alert_subscriptions.sql +22 -0
  26. package/migrations/sqlite/0015_events_retry_at.sql +1 -0
  27. package/migrations/sqlite/0016_email_suppressions.sql +7 -0
  28. package/migrations/sqlite/0017_order_shipments.sql +9 -0
  29. package/migrations/sqlite/0018_order_key_expiry.sql +25 -0
  30. package/migrations/sqlite/meta/0013_snapshot.json +1788 -0
  31. package/migrations/sqlite/meta/0014_snapshot.json +1931 -0
  32. package/migrations/sqlite/meta/0015_snapshot.json +1938 -0
  33. package/migrations/sqlite/meta/0016_snapshot.json +1981 -0
  34. package/migrations/sqlite/meta/0017_snapshot.json +2041 -0
  35. package/migrations/sqlite/meta/0018_snapshot.json +2048 -0
  36. package/migrations/sqlite/meta/_journal.json +42 -0
  37. package/package.json +17 -47
  38. package/dist/chunk-2PLYK5RU.js.map +0 -1
  39. package/dist/chunk-QN56IB4G.js.map +0 -1
  40. package/dist/register-UUQ64HZP.js +0 -8
  41. /package/dist/{register-UUQ64HZP.js.map → register-SBGUI2L5.js.map} +0 -0
@@ -0,0 +1,1788 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "307ae968-400f-4196-b51d-f0f8507fd779",
5
+ "prevId": "ce47190b-fbb6-4111-b7ae-06562d4bbaee",
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_access_keys": {
629
+ "name": "order_access_keys",
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
+ "key_hash": {
646
+ "name": "key_hash",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true,
650
+ "autoincrement": false
651
+ },
652
+ "purpose": {
653
+ "name": "purpose",
654
+ "type": "text",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false
658
+ },
659
+ "created_at": {
660
+ "name": "created_at",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": true,
664
+ "autoincrement": false
665
+ }
666
+ },
667
+ "indexes": {
668
+ "order_access_keys_key_hash_idx": {
669
+ "name": "order_access_keys_key_hash_idx",
670
+ "columns": [
671
+ "key_hash"
672
+ ],
673
+ "isUnique": true
674
+ },
675
+ "order_access_keys_order_idx": {
676
+ "name": "order_access_keys_order_idx",
677
+ "columns": [
678
+ "order_id"
679
+ ],
680
+ "isUnique": false
681
+ }
682
+ },
683
+ "foreignKeys": {},
684
+ "compositePrimaryKeys": {},
685
+ "uniqueConstraints": {},
686
+ "checkConstraints": {}
687
+ },
688
+ "order_history": {
689
+ "name": "order_history",
690
+ "columns": {
691
+ "id": {
692
+ "name": "id",
693
+ "type": "text",
694
+ "primaryKey": true,
695
+ "notNull": true,
696
+ "autoincrement": false
697
+ },
698
+ "order_id": {
699
+ "name": "order_id",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": true,
703
+ "autoincrement": false
704
+ },
705
+ "from_status": {
706
+ "name": "from_status",
707
+ "type": "text",
708
+ "primaryKey": false,
709
+ "notNull": false,
710
+ "autoincrement": false
711
+ },
712
+ "to_status": {
713
+ "name": "to_status",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": true,
717
+ "autoincrement": false
718
+ },
719
+ "actor": {
720
+ "name": "actor",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": true,
724
+ "autoincrement": false
725
+ },
726
+ "note": {
727
+ "name": "note",
728
+ "type": "text",
729
+ "primaryKey": false,
730
+ "notNull": true,
731
+ "autoincrement": false,
732
+ "default": "''"
733
+ },
734
+ "timestamp": {
735
+ "name": "timestamp",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "autoincrement": false
740
+ }
741
+ },
742
+ "indexes": {
743
+ "order_history_order_idx": {
744
+ "name": "order_history_order_idx",
745
+ "columns": [
746
+ "order_id"
747
+ ],
748
+ "isUnique": false
749
+ }
750
+ },
751
+ "foreignKeys": {},
752
+ "compositePrimaryKeys": {},
753
+ "uniqueConstraints": {},
754
+ "checkConstraints": {}
755
+ },
756
+ "order_refunds": {
757
+ "name": "order_refunds",
758
+ "columns": {
759
+ "id": {
760
+ "name": "id",
761
+ "type": "text",
762
+ "primaryKey": true,
763
+ "notNull": true,
764
+ "autoincrement": false
765
+ },
766
+ "order_id": {
767
+ "name": "order_id",
768
+ "type": "text",
769
+ "primaryKey": false,
770
+ "notNull": true,
771
+ "autoincrement": false
772
+ },
773
+ "amount_minor": {
774
+ "name": "amount_minor",
775
+ "type": "integer",
776
+ "primaryKey": false,
777
+ "notNull": true,
778
+ "autoincrement": false
779
+ },
780
+ "currency": {
781
+ "name": "currency",
782
+ "type": "text",
783
+ "primaryKey": false,
784
+ "notNull": true,
785
+ "autoincrement": false
786
+ },
787
+ "provider_refund_id": {
788
+ "name": "provider_refund_id",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": false,
792
+ "autoincrement": false
793
+ },
794
+ "status": {
795
+ "name": "status",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true,
799
+ "autoincrement": false,
800
+ "default": "'pending'"
801
+ },
802
+ "reason": {
803
+ "name": "reason",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": false,
807
+ "autoincrement": false
808
+ },
809
+ "actor": {
810
+ "name": "actor",
811
+ "type": "text",
812
+ "primaryKey": false,
813
+ "notNull": true,
814
+ "autoincrement": false
815
+ },
816
+ "created_at": {
817
+ "name": "created_at",
818
+ "type": "text",
819
+ "primaryKey": false,
820
+ "notNull": true,
821
+ "autoincrement": false
822
+ },
823
+ "request_id": {
824
+ "name": "request_id",
825
+ "type": "text",
826
+ "primaryKey": false,
827
+ "notNull": false,
828
+ "autoincrement": false
829
+ }
830
+ },
831
+ "indexes": {
832
+ "order_refunds_order_idx": {
833
+ "name": "order_refunds_order_idx",
834
+ "columns": [
835
+ "order_id"
836
+ ],
837
+ "isUnique": false
838
+ },
839
+ "order_refunds_order_request_idx": {
840
+ "name": "order_refunds_order_request_idx",
841
+ "columns": [
842
+ "order_id",
843
+ "request_id"
844
+ ],
845
+ "isUnique": true
846
+ }
847
+ },
848
+ "foreignKeys": {},
849
+ "compositePrimaryKeys": {},
850
+ "uniqueConstraints": {},
851
+ "checkConstraints": {}
852
+ },
853
+ "order_sequences": {
854
+ "name": "order_sequences",
855
+ "columns": {
856
+ "id": {
857
+ "name": "id",
858
+ "type": "integer",
859
+ "primaryKey": true,
860
+ "notNull": true,
861
+ "autoincrement": false
862
+ },
863
+ "next_value": {
864
+ "name": "next_value",
865
+ "type": "integer",
866
+ "primaryKey": false,
867
+ "notNull": true,
868
+ "autoincrement": false
869
+ }
870
+ },
871
+ "indexes": {},
872
+ "foreignKeys": {},
873
+ "compositePrimaryKeys": {},
874
+ "uniqueConstraints": {},
875
+ "checkConstraints": {}
876
+ },
877
+ "orders": {
878
+ "name": "orders",
879
+ "columns": {
880
+ "id": {
881
+ "name": "id",
882
+ "type": "text",
883
+ "primaryKey": true,
884
+ "notNull": true,
885
+ "autoincrement": false
886
+ },
887
+ "order_number": {
888
+ "name": "order_number",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": true,
892
+ "autoincrement": false
893
+ },
894
+ "sequence": {
895
+ "name": "sequence",
896
+ "type": "integer",
897
+ "primaryKey": false,
898
+ "notNull": true,
899
+ "autoincrement": false
900
+ },
901
+ "customer_id": {
902
+ "name": "customer_id",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": false,
906
+ "autoincrement": false
907
+ },
908
+ "status": {
909
+ "name": "status",
910
+ "type": "text",
911
+ "primaryKey": false,
912
+ "notNull": true,
913
+ "autoincrement": false,
914
+ "default": "'pending'"
915
+ },
916
+ "email": {
917
+ "name": "email",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true,
921
+ "autoincrement": false
922
+ },
923
+ "billing_address": {
924
+ "name": "billing_address",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false
929
+ },
930
+ "shipping_address": {
931
+ "name": "shipping_address",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true,
935
+ "autoincrement": false
936
+ },
937
+ "line_items": {
938
+ "name": "line_items",
939
+ "type": "text",
940
+ "primaryKey": false,
941
+ "notNull": true,
942
+ "autoincrement": false
943
+ },
944
+ "subtotal_minor": {
945
+ "name": "subtotal_minor",
946
+ "type": "integer",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "autoincrement": false
950
+ },
951
+ "tax_total_minor": {
952
+ "name": "tax_total_minor",
953
+ "type": "integer",
954
+ "primaryKey": false,
955
+ "notNull": true,
956
+ "autoincrement": false,
957
+ "default": 0
958
+ },
959
+ "shipping_total_minor": {
960
+ "name": "shipping_total_minor",
961
+ "type": "integer",
962
+ "primaryKey": false,
963
+ "notNull": true,
964
+ "autoincrement": false,
965
+ "default": 0
966
+ },
967
+ "discount_total_minor": {
968
+ "name": "discount_total_minor",
969
+ "type": "integer",
970
+ "primaryKey": false,
971
+ "notNull": true,
972
+ "autoincrement": false,
973
+ "default": 0
974
+ },
975
+ "total_minor": {
976
+ "name": "total_minor",
977
+ "type": "integer",
978
+ "primaryKey": false,
979
+ "notNull": true,
980
+ "autoincrement": false
981
+ },
982
+ "currency": {
983
+ "name": "currency",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": true,
987
+ "autoincrement": false
988
+ },
989
+ "notes": {
990
+ "name": "notes",
991
+ "type": "text",
992
+ "primaryKey": false,
993
+ "notNull": true,
994
+ "autoincrement": false,
995
+ "default": "''"
996
+ },
997
+ "metadata": {
998
+ "name": "metadata",
999
+ "type": "text",
1000
+ "primaryKey": false,
1001
+ "notNull": true,
1002
+ "autoincrement": false,
1003
+ "default": "'{}'"
1004
+ },
1005
+ "payment_intent_id": {
1006
+ "name": "payment_intent_id",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": false,
1010
+ "autoincrement": false
1011
+ },
1012
+ "cart_token": {
1013
+ "name": "cart_token",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": false,
1017
+ "autoincrement": false
1018
+ },
1019
+ "captured_minor": {
1020
+ "name": "captured_minor",
1021
+ "type": "integer",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false,
1025
+ "default": 0
1026
+ },
1027
+ "captured_at": {
1028
+ "name": "captured_at",
1029
+ "type": "text",
1030
+ "primaryKey": false,
1031
+ "notNull": false,
1032
+ "autoincrement": false
1033
+ },
1034
+ "refunded_minor": {
1035
+ "name": "refunded_minor",
1036
+ "type": "integer",
1037
+ "primaryKey": false,
1038
+ "notNull": true,
1039
+ "autoincrement": false,
1040
+ "default": 0
1041
+ },
1042
+ "capture_method": {
1043
+ "name": "capture_method",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": false,
1047
+ "autoincrement": false
1048
+ },
1049
+ "created_at": {
1050
+ "name": "created_at",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true,
1054
+ "autoincrement": false
1055
+ },
1056
+ "updated_at": {
1057
+ "name": "updated_at",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "autoincrement": false
1062
+ }
1063
+ },
1064
+ "indexes": {
1065
+ "orders_number_unique": {
1066
+ "name": "orders_number_unique",
1067
+ "columns": [
1068
+ "order_number"
1069
+ ],
1070
+ "isUnique": true
1071
+ },
1072
+ "orders_sequence_unique": {
1073
+ "name": "orders_sequence_unique",
1074
+ "columns": [
1075
+ "sequence"
1076
+ ],
1077
+ "isUnique": true
1078
+ },
1079
+ "orders_customer_idx": {
1080
+ "name": "orders_customer_idx",
1081
+ "columns": [
1082
+ "customer_id"
1083
+ ],
1084
+ "isUnique": false
1085
+ },
1086
+ "orders_status_idx": {
1087
+ "name": "orders_status_idx",
1088
+ "columns": [
1089
+ "status"
1090
+ ],
1091
+ "isUnique": false
1092
+ },
1093
+ "orders_payment_intent_idx": {
1094
+ "name": "orders_payment_intent_idx",
1095
+ "columns": [
1096
+ "payment_intent_id"
1097
+ ],
1098
+ "isUnique": false
1099
+ },
1100
+ "orders_pending_cart_unique": {
1101
+ "name": "orders_pending_cart_unique",
1102
+ "columns": [
1103
+ "cart_token"
1104
+ ],
1105
+ "isUnique": true,
1106
+ "where": "status = 'pending'"
1107
+ }
1108
+ },
1109
+ "foreignKeys": {},
1110
+ "compositePrimaryKeys": {},
1111
+ "uniqueConstraints": {},
1112
+ "checkConstraints": {}
1113
+ },
1114
+ "processed_events": {
1115
+ "name": "processed_events",
1116
+ "columns": {
1117
+ "handler_name": {
1118
+ "name": "handler_name",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false
1123
+ },
1124
+ "event_id": {
1125
+ "name": "event_id",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false
1130
+ },
1131
+ "processed_at": {
1132
+ "name": "processed_at",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": true,
1136
+ "autoincrement": false
1137
+ }
1138
+ },
1139
+ "indexes": {},
1140
+ "foreignKeys": {},
1141
+ "compositePrimaryKeys": {
1142
+ "processed_events_handler_name_event_id_pk": {
1143
+ "columns": [
1144
+ "handler_name",
1145
+ "event_id"
1146
+ ],
1147
+ "name": "processed_events_handler_name_event_id_pk"
1148
+ }
1149
+ },
1150
+ "uniqueConstraints": {},
1151
+ "checkConstraints": {}
1152
+ },
1153
+ "product_categories": {
1154
+ "name": "product_categories",
1155
+ "columns": {
1156
+ "product_id": {
1157
+ "name": "product_id",
1158
+ "type": "text",
1159
+ "primaryKey": false,
1160
+ "notNull": true,
1161
+ "autoincrement": false
1162
+ },
1163
+ "category_id": {
1164
+ "name": "category_id",
1165
+ "type": "text",
1166
+ "primaryKey": false,
1167
+ "notNull": true,
1168
+ "autoincrement": false
1169
+ }
1170
+ },
1171
+ "indexes": {
1172
+ "product_categories_category_idx": {
1173
+ "name": "product_categories_category_idx",
1174
+ "columns": [
1175
+ "category_id"
1176
+ ],
1177
+ "isUnique": false
1178
+ }
1179
+ },
1180
+ "foreignKeys": {},
1181
+ "compositePrimaryKeys": {
1182
+ "product_categories_product_id_category_id_pk": {
1183
+ "columns": [
1184
+ "product_id",
1185
+ "category_id"
1186
+ ],
1187
+ "name": "product_categories_product_id_category_id_pk"
1188
+ }
1189
+ },
1190
+ "uniqueConstraints": {},
1191
+ "checkConstraints": {}
1192
+ },
1193
+ "products": {
1194
+ "name": "products",
1195
+ "columns": {
1196
+ "id": {
1197
+ "name": "id",
1198
+ "type": "text",
1199
+ "primaryKey": true,
1200
+ "notNull": true,
1201
+ "autoincrement": false
1202
+ },
1203
+ "slug": {
1204
+ "name": "slug",
1205
+ "type": "text",
1206
+ "primaryKey": false,
1207
+ "notNull": true,
1208
+ "autoincrement": false
1209
+ },
1210
+ "name": {
1211
+ "name": "name",
1212
+ "type": "text",
1213
+ "primaryKey": false,
1214
+ "notNull": true,
1215
+ "autoincrement": false
1216
+ },
1217
+ "description": {
1218
+ "name": "description",
1219
+ "type": "text",
1220
+ "primaryKey": false,
1221
+ "notNull": true,
1222
+ "autoincrement": false,
1223
+ "default": "''"
1224
+ },
1225
+ "short_description": {
1226
+ "name": "short_description",
1227
+ "type": "text",
1228
+ "primaryKey": false,
1229
+ "notNull": true,
1230
+ "autoincrement": false,
1231
+ "default": "''"
1232
+ },
1233
+ "status": {
1234
+ "name": "status",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": true,
1238
+ "autoincrement": false,
1239
+ "default": "'draft'"
1240
+ },
1241
+ "type": {
1242
+ "name": "type",
1243
+ "type": "text",
1244
+ "primaryKey": false,
1245
+ "notNull": true,
1246
+ "autoincrement": false,
1247
+ "default": "'simple'"
1248
+ },
1249
+ "seo_title": {
1250
+ "name": "seo_title",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": true,
1254
+ "autoincrement": false,
1255
+ "default": "''"
1256
+ },
1257
+ "seo_description": {
1258
+ "name": "seo_description",
1259
+ "type": "text",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "autoincrement": false,
1263
+ "default": "''"
1264
+ },
1265
+ "media": {
1266
+ "name": "media",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": true,
1270
+ "autoincrement": false,
1271
+ "default": "'[]'"
1272
+ },
1273
+ "metadata": {
1274
+ "name": "metadata",
1275
+ "type": "text",
1276
+ "primaryKey": false,
1277
+ "notNull": true,
1278
+ "autoincrement": false,
1279
+ "default": "'{}'"
1280
+ },
1281
+ "created_at": {
1282
+ "name": "created_at",
1283
+ "type": "text",
1284
+ "primaryKey": false,
1285
+ "notNull": true,
1286
+ "autoincrement": false
1287
+ },
1288
+ "updated_at": {
1289
+ "name": "updated_at",
1290
+ "type": "text",
1291
+ "primaryKey": false,
1292
+ "notNull": true,
1293
+ "autoincrement": false
1294
+ }
1295
+ },
1296
+ "indexes": {
1297
+ "products_slug_unique": {
1298
+ "name": "products_slug_unique",
1299
+ "columns": [
1300
+ "slug"
1301
+ ],
1302
+ "isUnique": true
1303
+ },
1304
+ "products_status_idx": {
1305
+ "name": "products_status_idx",
1306
+ "columns": [
1307
+ "status"
1308
+ ],
1309
+ "isUnique": false
1310
+ }
1311
+ },
1312
+ "foreignKeys": {},
1313
+ "compositePrimaryKeys": {},
1314
+ "uniqueConstraints": {},
1315
+ "checkConstraints": {}
1316
+ },
1317
+ "refresh_tokens": {
1318
+ "name": "refresh_tokens",
1319
+ "columns": {
1320
+ "id": {
1321
+ "name": "id",
1322
+ "type": "text",
1323
+ "primaryKey": true,
1324
+ "notNull": true,
1325
+ "autoincrement": false
1326
+ },
1327
+ "customer_id": {
1328
+ "name": "customer_id",
1329
+ "type": "text",
1330
+ "primaryKey": false,
1331
+ "notNull": true,
1332
+ "autoincrement": false
1333
+ },
1334
+ "token_hash": {
1335
+ "name": "token_hash",
1336
+ "type": "text",
1337
+ "primaryKey": false,
1338
+ "notNull": true,
1339
+ "autoincrement": false
1340
+ },
1341
+ "revoked_at": {
1342
+ "name": "revoked_at",
1343
+ "type": "text",
1344
+ "primaryKey": false,
1345
+ "notNull": false,
1346
+ "autoincrement": false
1347
+ },
1348
+ "replaced_by_jti": {
1349
+ "name": "replaced_by_jti",
1350
+ "type": "text",
1351
+ "primaryKey": false,
1352
+ "notNull": false,
1353
+ "autoincrement": false
1354
+ },
1355
+ "expires_at": {
1356
+ "name": "expires_at",
1357
+ "type": "text",
1358
+ "primaryKey": false,
1359
+ "notNull": true,
1360
+ "autoincrement": false
1361
+ },
1362
+ "created_at": {
1363
+ "name": "created_at",
1364
+ "type": "text",
1365
+ "primaryKey": false,
1366
+ "notNull": true,
1367
+ "autoincrement": false
1368
+ }
1369
+ },
1370
+ "indexes": {
1371
+ "refresh_tokens_customer_idx": {
1372
+ "name": "refresh_tokens_customer_idx",
1373
+ "columns": [
1374
+ "customer_id"
1375
+ ],
1376
+ "isUnique": false
1377
+ }
1378
+ },
1379
+ "foreignKeys": {},
1380
+ "compositePrimaryKeys": {},
1381
+ "uniqueConstraints": {},
1382
+ "checkConstraints": {}
1383
+ },
1384
+ "reviews": {
1385
+ "name": "reviews",
1386
+ "columns": {
1387
+ "id": {
1388
+ "name": "id",
1389
+ "type": "text",
1390
+ "primaryKey": true,
1391
+ "notNull": true,
1392
+ "autoincrement": false
1393
+ },
1394
+ "product_id": {
1395
+ "name": "product_id",
1396
+ "type": "text",
1397
+ "primaryKey": false,
1398
+ "notNull": true,
1399
+ "autoincrement": false
1400
+ },
1401
+ "customer_id": {
1402
+ "name": "customer_id",
1403
+ "type": "text",
1404
+ "primaryKey": false,
1405
+ "notNull": false,
1406
+ "autoincrement": false
1407
+ },
1408
+ "order_id": {
1409
+ "name": "order_id",
1410
+ "type": "text",
1411
+ "primaryKey": false,
1412
+ "notNull": false,
1413
+ "autoincrement": false
1414
+ },
1415
+ "rating": {
1416
+ "name": "rating",
1417
+ "type": "integer",
1418
+ "primaryKey": false,
1419
+ "notNull": true,
1420
+ "autoincrement": false
1421
+ },
1422
+ "title": {
1423
+ "name": "title",
1424
+ "type": "text",
1425
+ "primaryKey": false,
1426
+ "notNull": true,
1427
+ "autoincrement": false,
1428
+ "default": "''"
1429
+ },
1430
+ "body": {
1431
+ "name": "body",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": true,
1435
+ "autoincrement": false,
1436
+ "default": "''"
1437
+ },
1438
+ "moderation_status": {
1439
+ "name": "moderation_status",
1440
+ "type": "text",
1441
+ "primaryKey": false,
1442
+ "notNull": true,
1443
+ "autoincrement": false,
1444
+ "default": "'pending'"
1445
+ },
1446
+ "submitted_at": {
1447
+ "name": "submitted_at",
1448
+ "type": "text",
1449
+ "primaryKey": false,
1450
+ "notNull": true,
1451
+ "autoincrement": false
1452
+ },
1453
+ "moderated_at": {
1454
+ "name": "moderated_at",
1455
+ "type": "text",
1456
+ "primaryKey": false,
1457
+ "notNull": false,
1458
+ "autoincrement": false
1459
+ },
1460
+ "moderated_by": {
1461
+ "name": "moderated_by",
1462
+ "type": "text",
1463
+ "primaryKey": false,
1464
+ "notNull": false,
1465
+ "autoincrement": false
1466
+ }
1467
+ },
1468
+ "indexes": {
1469
+ "reviews_product_idx": {
1470
+ "name": "reviews_product_idx",
1471
+ "columns": [
1472
+ "product_id"
1473
+ ],
1474
+ "isUnique": false
1475
+ },
1476
+ "reviews_status_idx": {
1477
+ "name": "reviews_status_idx",
1478
+ "columns": [
1479
+ "moderation_status"
1480
+ ],
1481
+ "isUnique": false
1482
+ }
1483
+ },
1484
+ "foreignKeys": {},
1485
+ "compositePrimaryKeys": {},
1486
+ "uniqueConstraints": {},
1487
+ "checkConstraints": {}
1488
+ },
1489
+ "settings": {
1490
+ "name": "settings",
1491
+ "columns": {
1492
+ "slot": {
1493
+ "name": "slot",
1494
+ "type": "text",
1495
+ "primaryKey": false,
1496
+ "notNull": true,
1497
+ "autoincrement": false
1498
+ },
1499
+ "path": {
1500
+ "name": "path",
1501
+ "type": "text",
1502
+ "primaryKey": false,
1503
+ "notNull": true,
1504
+ "autoincrement": false
1505
+ },
1506
+ "ciphertext": {
1507
+ "name": "ciphertext",
1508
+ "type": "blob",
1509
+ "primaryKey": false,
1510
+ "notNull": false,
1511
+ "autoincrement": false
1512
+ },
1513
+ "plain": {
1514
+ "name": "plain",
1515
+ "type": "text",
1516
+ "primaryKey": false,
1517
+ "notNull": false,
1518
+ "autoincrement": false
1519
+ },
1520
+ "iv": {
1521
+ "name": "iv",
1522
+ "type": "blob",
1523
+ "primaryKey": false,
1524
+ "notNull": false,
1525
+ "autoincrement": false
1526
+ },
1527
+ "tag": {
1528
+ "name": "tag",
1529
+ "type": "blob",
1530
+ "primaryKey": false,
1531
+ "notNull": false,
1532
+ "autoincrement": false
1533
+ },
1534
+ "key_id": {
1535
+ "name": "key_id",
1536
+ "type": "text",
1537
+ "primaryKey": false,
1538
+ "notNull": false,
1539
+ "autoincrement": false
1540
+ },
1541
+ "updated_at": {
1542
+ "name": "updated_at",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": true,
1546
+ "autoincrement": false
1547
+ },
1548
+ "updated_by": {
1549
+ "name": "updated_by",
1550
+ "type": "text",
1551
+ "primaryKey": false,
1552
+ "notNull": false,
1553
+ "autoincrement": false
1554
+ }
1555
+ },
1556
+ "indexes": {},
1557
+ "foreignKeys": {},
1558
+ "compositePrimaryKeys": {
1559
+ "settings_slot_path_pk": {
1560
+ "columns": [
1561
+ "slot",
1562
+ "path"
1563
+ ],
1564
+ "name": "settings_slot_path_pk"
1565
+ }
1566
+ },
1567
+ "uniqueConstraints": {},
1568
+ "checkConstraints": {
1569
+ "settings_one_value": {
1570
+ "name": "settings_one_value",
1571
+ "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))"
1572
+ }
1573
+ }
1574
+ },
1575
+ "stock_adjustments": {
1576
+ "name": "stock_adjustments",
1577
+ "columns": {
1578
+ "id": {
1579
+ "name": "id",
1580
+ "type": "text",
1581
+ "primaryKey": true,
1582
+ "notNull": true,
1583
+ "autoincrement": false
1584
+ },
1585
+ "variant_id": {
1586
+ "name": "variant_id",
1587
+ "type": "text",
1588
+ "primaryKey": false,
1589
+ "notNull": true,
1590
+ "autoincrement": false
1591
+ },
1592
+ "adjustment": {
1593
+ "name": "adjustment",
1594
+ "type": "integer",
1595
+ "primaryKey": false,
1596
+ "notNull": true,
1597
+ "autoincrement": false
1598
+ },
1599
+ "reason": {
1600
+ "name": "reason",
1601
+ "type": "text",
1602
+ "primaryKey": false,
1603
+ "notNull": true,
1604
+ "autoincrement": false
1605
+ },
1606
+ "actor": {
1607
+ "name": "actor",
1608
+ "type": "text",
1609
+ "primaryKey": false,
1610
+ "notNull": true,
1611
+ "autoincrement": false
1612
+ },
1613
+ "previous_qty": {
1614
+ "name": "previous_qty",
1615
+ "type": "integer",
1616
+ "primaryKey": false,
1617
+ "notNull": true,
1618
+ "autoincrement": false
1619
+ },
1620
+ "new_qty": {
1621
+ "name": "new_qty",
1622
+ "type": "integer",
1623
+ "primaryKey": false,
1624
+ "notNull": true,
1625
+ "autoincrement": false
1626
+ },
1627
+ "timestamp": {
1628
+ "name": "timestamp",
1629
+ "type": "text",
1630
+ "primaryKey": false,
1631
+ "notNull": true,
1632
+ "autoincrement": false
1633
+ }
1634
+ },
1635
+ "indexes": {
1636
+ "stock_adjustments_variant_idx": {
1637
+ "name": "stock_adjustments_variant_idx",
1638
+ "columns": [
1639
+ "variant_id"
1640
+ ],
1641
+ "isUnique": false
1642
+ }
1643
+ },
1644
+ "foreignKeys": {},
1645
+ "compositePrimaryKeys": {},
1646
+ "uniqueConstraints": {},
1647
+ "checkConstraints": {}
1648
+ },
1649
+ "variants": {
1650
+ "name": "variants",
1651
+ "columns": {
1652
+ "id": {
1653
+ "name": "id",
1654
+ "type": "text",
1655
+ "primaryKey": true,
1656
+ "notNull": true,
1657
+ "autoincrement": false
1658
+ },
1659
+ "product_id": {
1660
+ "name": "product_id",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": true,
1664
+ "autoincrement": false
1665
+ },
1666
+ "sku": {
1667
+ "name": "sku",
1668
+ "type": "text",
1669
+ "primaryKey": false,
1670
+ "notNull": true,
1671
+ "autoincrement": false
1672
+ },
1673
+ "name": {
1674
+ "name": "name",
1675
+ "type": "text",
1676
+ "primaryKey": false,
1677
+ "notNull": true,
1678
+ "autoincrement": false,
1679
+ "default": "''"
1680
+ },
1681
+ "price_minor": {
1682
+ "name": "price_minor",
1683
+ "type": "integer",
1684
+ "primaryKey": false,
1685
+ "notNull": true,
1686
+ "autoincrement": false
1687
+ },
1688
+ "compare_at_price_minor": {
1689
+ "name": "compare_at_price_minor",
1690
+ "type": "integer",
1691
+ "primaryKey": false,
1692
+ "notNull": false,
1693
+ "autoincrement": false
1694
+ },
1695
+ "weight_grams": {
1696
+ "name": "weight_grams",
1697
+ "type": "integer",
1698
+ "primaryKey": false,
1699
+ "notNull": false,
1700
+ "autoincrement": false
1701
+ },
1702
+ "dimensions": {
1703
+ "name": "dimensions",
1704
+ "type": "text",
1705
+ "primaryKey": false,
1706
+ "notNull": false,
1707
+ "autoincrement": false
1708
+ },
1709
+ "stock": {
1710
+ "name": "stock",
1711
+ "type": "integer",
1712
+ "primaryKey": false,
1713
+ "notNull": true,
1714
+ "autoincrement": false,
1715
+ "default": 0
1716
+ },
1717
+ "low_stock_threshold": {
1718
+ "name": "low_stock_threshold",
1719
+ "type": "integer",
1720
+ "primaryKey": false,
1721
+ "notNull": true,
1722
+ "autoincrement": false,
1723
+ "default": 0
1724
+ },
1725
+ "options": {
1726
+ "name": "options",
1727
+ "type": "text",
1728
+ "primaryKey": false,
1729
+ "notNull": true,
1730
+ "autoincrement": false,
1731
+ "default": "'[]'"
1732
+ },
1733
+ "status": {
1734
+ "name": "status",
1735
+ "type": "text",
1736
+ "primaryKey": false,
1737
+ "notNull": true,
1738
+ "autoincrement": false,
1739
+ "default": "'active'"
1740
+ },
1741
+ "created_at": {
1742
+ "name": "created_at",
1743
+ "type": "text",
1744
+ "primaryKey": false,
1745
+ "notNull": true,
1746
+ "autoincrement": false
1747
+ },
1748
+ "updated_at": {
1749
+ "name": "updated_at",
1750
+ "type": "text",
1751
+ "primaryKey": false,
1752
+ "notNull": true,
1753
+ "autoincrement": false
1754
+ }
1755
+ },
1756
+ "indexes": {
1757
+ "variants_sku_unique": {
1758
+ "name": "variants_sku_unique",
1759
+ "columns": [
1760
+ "sku"
1761
+ ],
1762
+ "isUnique": true
1763
+ },
1764
+ "variants_product_idx": {
1765
+ "name": "variants_product_idx",
1766
+ "columns": [
1767
+ "product_id"
1768
+ ],
1769
+ "isUnique": false
1770
+ }
1771
+ },
1772
+ "foreignKeys": {},
1773
+ "compositePrimaryKeys": {},
1774
+ "uniqueConstraints": {},
1775
+ "checkConstraints": {}
1776
+ }
1777
+ },
1778
+ "views": {},
1779
+ "enums": {},
1780
+ "_meta": {
1781
+ "schemas": {},
1782
+ "tables": {},
1783
+ "columns": {}
1784
+ },
1785
+ "internal": {
1786
+ "indexes": {}
1787
+ }
1788
+ }