@wrenautomation/vireo 0.11.0 → 0.13.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.
@@ -0,0 +1,1256 @@
1
+ {
2
+ "id": "8af04912-2ab6-4df4-94d4-0a1b42b0610a",
3
+ "prevId": "6270648d-29ba-4666-a989-c7dea466d411",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "vireo.batches": {
8
+ "name": "batches",
9
+ "schema": "vireo",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "serial",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "subject_id": {
18
+ "name": "subject_id",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "n": {
24
+ "name": "n",
25
+ "type": "integer",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "title": {
30
+ "name": "title",
31
+ "type": "varchar(120)",
32
+ "primaryKey": false,
33
+ "notNull": false
34
+ },
35
+ "why": {
36
+ "name": "why",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "agent": {
42
+ "name": "agent",
43
+ "type": "varchar(120)",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "state": {
48
+ "name": "state",
49
+ "type": "varchar(8)",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "default": "'open'"
53
+ },
54
+ "note": {
55
+ "name": "note",
56
+ "type": "text",
57
+ "primaryKey": false,
58
+ "notNull": false
59
+ },
60
+ "closed_at": {
61
+ "name": "closed_at",
62
+ "type": "timestamp with time zone",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "created_at": {
67
+ "name": "created_at",
68
+ "type": "timestamp with time zone",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "default": "now()"
72
+ }
73
+ },
74
+ "indexes": {
75
+ "ix_vireo_batches_subject": {
76
+ "name": "ix_vireo_batches_subject",
77
+ "columns": [
78
+ {
79
+ "expression": "subject_id",
80
+ "isExpression": false,
81
+ "asc": true,
82
+ "nulls": "last"
83
+ },
84
+ {
85
+ "expression": "state",
86
+ "isExpression": false,
87
+ "asc": true,
88
+ "nulls": "last"
89
+ }
90
+ ],
91
+ "isUnique": false,
92
+ "concurrently": false,
93
+ "method": "btree",
94
+ "with": {}
95
+ }
96
+ },
97
+ "foreignKeys": {
98
+ "fk_batches_subject_id_subjects": {
99
+ "name": "fk_batches_subject_id_subjects",
100
+ "tableFrom": "batches",
101
+ "tableTo": "subjects",
102
+ "schemaTo": "vireo",
103
+ "columnsFrom": [
104
+ "subject_id"
105
+ ],
106
+ "columnsTo": [
107
+ "id"
108
+ ],
109
+ "onDelete": "cascade",
110
+ "onUpdate": "no action"
111
+ }
112
+ },
113
+ "compositePrimaryKeys": {
114
+ "pk_batches": {
115
+ "name": "pk_batches",
116
+ "columns": [
117
+ "id"
118
+ ]
119
+ }
120
+ },
121
+ "uniqueConstraints": {
122
+ "uq_vireo_batches_subject_n": {
123
+ "name": "uq_vireo_batches_subject_n",
124
+ "nullsNotDistinct": false,
125
+ "columns": [
126
+ "subject_id",
127
+ "n"
128
+ ]
129
+ }
130
+ },
131
+ "policies": {},
132
+ "checkConstraints": {
133
+ "ck_vireo_batches_state": {
134
+ "name": "ck_vireo_batches_state",
135
+ "value": "(\"state\")::text = ANY ((ARRAY['open'::character varying, 'closed'::character varying])::text[])"
136
+ }
137
+ },
138
+ "isRLSEnabled": false
139
+ },
140
+ "vireo.calls": {
141
+ "name": "calls",
142
+ "schema": "vireo",
143
+ "columns": {
144
+ "id": {
145
+ "name": "id",
146
+ "type": "serial",
147
+ "primaryKey": false,
148
+ "notNull": true
149
+ },
150
+ "sample_id": {
151
+ "name": "sample_id",
152
+ "type": "integer",
153
+ "primaryKey": false,
154
+ "notNull": true
155
+ },
156
+ "by": {
157
+ "name": "by",
158
+ "type": "varchar(320)",
159
+ "primaryKey": false,
160
+ "notNull": true
161
+ },
162
+ "score": {
163
+ "name": "score",
164
+ "type": "smallint",
165
+ "primaryKey": false,
166
+ "notNull": true
167
+ },
168
+ "verdict": {
169
+ "name": "verdict",
170
+ "type": "varchar(8)",
171
+ "primaryKey": false,
172
+ "notNull": true
173
+ },
174
+ "at": {
175
+ "name": "at",
176
+ "type": "timestamp with time zone",
177
+ "primaryKey": false,
178
+ "notNull": true,
179
+ "default": "now()"
180
+ }
181
+ },
182
+ "indexes": {
183
+ "ix_vireo_calls_by": {
184
+ "name": "ix_vireo_calls_by",
185
+ "columns": [
186
+ {
187
+ "expression": "by",
188
+ "isExpression": false,
189
+ "asc": true,
190
+ "nulls": "last"
191
+ }
192
+ ],
193
+ "isUnique": false,
194
+ "concurrently": false,
195
+ "method": "btree",
196
+ "with": {}
197
+ }
198
+ },
199
+ "foreignKeys": {
200
+ "fk_calls_sample_id_samples": {
201
+ "name": "fk_calls_sample_id_samples",
202
+ "tableFrom": "calls",
203
+ "tableTo": "samples",
204
+ "schemaTo": "vireo",
205
+ "columnsFrom": [
206
+ "sample_id"
207
+ ],
208
+ "columnsTo": [
209
+ "id"
210
+ ],
211
+ "onDelete": "cascade",
212
+ "onUpdate": "no action"
213
+ }
214
+ },
215
+ "compositePrimaryKeys": {
216
+ "pk_calls": {
217
+ "name": "pk_calls",
218
+ "columns": [
219
+ "id"
220
+ ]
221
+ }
222
+ },
223
+ "uniqueConstraints": {
224
+ "uq_vireo_calls_sample_by": {
225
+ "name": "uq_vireo_calls_sample_by",
226
+ "nullsNotDistinct": false,
227
+ "columns": [
228
+ "sample_id",
229
+ "by"
230
+ ]
231
+ }
232
+ },
233
+ "policies": {},
234
+ "checkConstraints": {
235
+ "ck_vireo_calls_verdict": {
236
+ "name": "ck_vireo_calls_verdict",
237
+ "value": "(\"verdict\")::text = ANY ((ARRAY['amazing'::character varying, 'good'::character varying, 'okay'::character varying, 'bad'::character varying])::text[])"
238
+ },
239
+ "ck_vireo_calls_score": {
240
+ "name": "ck_vireo_calls_score",
241
+ "value": "\"vireo\".\"calls\".\"score\" BETWEEN 1 AND 10"
242
+ },
243
+ "ck_vireo_calls_zone": {
244
+ "name": "ck_vireo_calls_zone",
245
+ "value": "\"vireo\".\"calls\".\"verdict\" = (CASE WHEN \"vireo\".\"calls\".\"score\" >= 9 THEN 'amazing' WHEN \"vireo\".\"calls\".\"score\" >= 7 THEN 'good' WHEN \"vireo\".\"calls\".\"score\" >= 4 THEN 'okay' ELSE 'bad' END)"
246
+ }
247
+ },
248
+ "isRLSEnabled": false
249
+ },
250
+ "vireo.guides": {
251
+ "name": "guides",
252
+ "schema": "vireo",
253
+ "columns": {
254
+ "id": {
255
+ "name": "id",
256
+ "type": "serial",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "text": {
261
+ "name": "text",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "source": {
267
+ "name": "source",
268
+ "type": "varchar(8)",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "default": "'person'"
272
+ },
273
+ "ref": {
274
+ "name": "ref",
275
+ "type": "text",
276
+ "primaryKey": false,
277
+ "notNull": false
278
+ },
279
+ "subject_id": {
280
+ "name": "subject_id",
281
+ "type": "integer",
282
+ "primaryKey": false,
283
+ "notNull": false
284
+ },
285
+ "kind": {
286
+ "name": "kind",
287
+ "type": "varchar(8)",
288
+ "primaryKey": false,
289
+ "notNull": false
290
+ },
291
+ "state": {
292
+ "name": "state",
293
+ "type": "varchar(8)",
294
+ "primaryKey": false,
295
+ "notNull": true,
296
+ "default": "'testing'"
297
+ },
298
+ "by": {
299
+ "name": "by",
300
+ "type": "varchar(320)",
301
+ "primaryKey": false,
302
+ "notNull": false
303
+ },
304
+ "decided_at": {
305
+ "name": "decided_at",
306
+ "type": "timestamp with time zone",
307
+ "primaryKey": false,
308
+ "notNull": false
309
+ },
310
+ "created_at": {
311
+ "name": "created_at",
312
+ "type": "timestamp with time zone",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "default": "now()"
316
+ }
317
+ },
318
+ "indexes": {
319
+ "ix_vireo_guides_subject": {
320
+ "name": "ix_vireo_guides_subject",
321
+ "columns": [
322
+ {
323
+ "expression": "subject_id",
324
+ "isExpression": false,
325
+ "asc": true,
326
+ "nulls": "last"
327
+ }
328
+ ],
329
+ "isUnique": false,
330
+ "concurrently": false,
331
+ "method": "btree",
332
+ "with": {}
333
+ }
334
+ },
335
+ "foreignKeys": {
336
+ "fk_guides_subject_id_subjects": {
337
+ "name": "fk_guides_subject_id_subjects",
338
+ "tableFrom": "guides",
339
+ "tableTo": "subjects",
340
+ "schemaTo": "vireo",
341
+ "columnsFrom": [
342
+ "subject_id"
343
+ ],
344
+ "columnsTo": [
345
+ "id"
346
+ ],
347
+ "onDelete": "cascade",
348
+ "onUpdate": "no action"
349
+ }
350
+ },
351
+ "compositePrimaryKeys": {
352
+ "pk_guides": {
353
+ "name": "pk_guides",
354
+ "columns": [
355
+ "id"
356
+ ]
357
+ }
358
+ },
359
+ "uniqueConstraints": {},
360
+ "policies": {},
361
+ "checkConstraints": {
362
+ "ck_vireo_guides_source": {
363
+ "name": "ck_vireo_guides_source",
364
+ "value": "(\"source\")::text = ANY ((ARRAY['person'::character varying, 'study'::character varying, 'sop'::character varying, 'skill'::character varying, 'agent'::character varying])::text[])"
365
+ },
366
+ "ck_vireo_guides_kind": {
367
+ "name": "ck_vireo_guides_kind",
368
+ "value": "(\"kind\")::text = ANY ((ARRAY['text'::character varying, 'image'::character varying, 'video'::character varying, 'page'::character varying])::text[])"
369
+ },
370
+ "ck_vireo_guides_state": {
371
+ "name": "ck_vireo_guides_state",
372
+ "value": "(\"state\")::text = ANY ((ARRAY['testing'::character varying, 'locked'::character varying, 'dropped'::character varying])::text[])"
373
+ }
374
+ },
375
+ "isRLSEnabled": false
376
+ },
377
+ "vireo.lineage": {
378
+ "name": "lineage",
379
+ "schema": "vireo",
380
+ "columns": {
381
+ "child_id": {
382
+ "name": "child_id",
383
+ "type": "integer",
384
+ "primaryKey": false,
385
+ "notNull": true
386
+ },
387
+ "parent_id": {
388
+ "name": "parent_id",
389
+ "type": "integer",
390
+ "primaryKey": false,
391
+ "notNull": true
392
+ },
393
+ "position": {
394
+ "name": "position",
395
+ "type": "smallint",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "default": 0
399
+ },
400
+ "took": {
401
+ "name": "took",
402
+ "type": "text",
403
+ "primaryKey": false,
404
+ "notNull": false
405
+ }
406
+ },
407
+ "indexes": {
408
+ "ix_vireo_lineage_parent": {
409
+ "name": "ix_vireo_lineage_parent",
410
+ "columns": [
411
+ {
412
+ "expression": "parent_id",
413
+ "isExpression": false,
414
+ "asc": true,
415
+ "nulls": "last"
416
+ }
417
+ ],
418
+ "isUnique": false,
419
+ "concurrently": false,
420
+ "method": "btree",
421
+ "with": {}
422
+ }
423
+ },
424
+ "foreignKeys": {
425
+ "fk_lineage_child_id_samples": {
426
+ "name": "fk_lineage_child_id_samples",
427
+ "tableFrom": "lineage",
428
+ "tableTo": "samples",
429
+ "schemaTo": "vireo",
430
+ "columnsFrom": [
431
+ "child_id"
432
+ ],
433
+ "columnsTo": [
434
+ "id"
435
+ ],
436
+ "onDelete": "cascade",
437
+ "onUpdate": "no action"
438
+ },
439
+ "fk_lineage_parent_id_samples": {
440
+ "name": "fk_lineage_parent_id_samples",
441
+ "tableFrom": "lineage",
442
+ "tableTo": "samples",
443
+ "schemaTo": "vireo",
444
+ "columnsFrom": [
445
+ "parent_id"
446
+ ],
447
+ "columnsTo": [
448
+ "id"
449
+ ],
450
+ "onDelete": "cascade",
451
+ "onUpdate": "no action"
452
+ }
453
+ },
454
+ "compositePrimaryKeys": {
455
+ "pk_lineage": {
456
+ "name": "pk_lineage",
457
+ "columns": [
458
+ "child_id",
459
+ "parent_id"
460
+ ]
461
+ }
462
+ },
463
+ "uniqueConstraints": {},
464
+ "policies": {},
465
+ "checkConstraints": {
466
+ "ck_vireo_lineage_not_self": {
467
+ "name": "ck_vireo_lineage_not_self",
468
+ "value": "\"child_id\" <> \"parent_id\""
469
+ }
470
+ },
471
+ "isRLSEnabled": false
472
+ },
473
+ "vireo.notes": {
474
+ "name": "notes",
475
+ "schema": "vireo",
476
+ "columns": {
477
+ "id": {
478
+ "name": "id",
479
+ "type": "serial",
480
+ "primaryKey": false,
481
+ "notNull": true
482
+ },
483
+ "sample_id": {
484
+ "name": "sample_id",
485
+ "type": "integer",
486
+ "primaryKey": false,
487
+ "notNull": true
488
+ },
489
+ "anchor": {
490
+ "name": "anchor",
491
+ "type": "jsonb",
492
+ "primaryKey": false,
493
+ "notNull": false
494
+ },
495
+ "tone": {
496
+ "name": "tone",
497
+ "type": "varchar(4)",
498
+ "primaryKey": false,
499
+ "notNull": false
500
+ },
501
+ "text": {
502
+ "name": "text",
503
+ "type": "text",
504
+ "primaryKey": false,
505
+ "notNull": false
506
+ },
507
+ "by": {
508
+ "name": "by",
509
+ "type": "varchar(320)",
510
+ "primaryKey": false,
511
+ "notNull": false
512
+ },
513
+ "created_at": {
514
+ "name": "created_at",
515
+ "type": "timestamp with time zone",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "default": "now()"
519
+ }
520
+ },
521
+ "indexes": {
522
+ "ix_vireo_notes_sample": {
523
+ "name": "ix_vireo_notes_sample",
524
+ "columns": [
525
+ {
526
+ "expression": "sample_id",
527
+ "isExpression": false,
528
+ "asc": true,
529
+ "nulls": "last"
530
+ }
531
+ ],
532
+ "isUnique": false,
533
+ "concurrently": false,
534
+ "method": "btree",
535
+ "with": {}
536
+ }
537
+ },
538
+ "foreignKeys": {
539
+ "fk_notes_sample_id_samples": {
540
+ "name": "fk_notes_sample_id_samples",
541
+ "tableFrom": "notes",
542
+ "tableTo": "samples",
543
+ "schemaTo": "vireo",
544
+ "columnsFrom": [
545
+ "sample_id"
546
+ ],
547
+ "columnsTo": [
548
+ "id"
549
+ ],
550
+ "onDelete": "cascade",
551
+ "onUpdate": "no action"
552
+ }
553
+ },
554
+ "compositePrimaryKeys": {
555
+ "pk_notes": {
556
+ "name": "pk_notes",
557
+ "columns": [
558
+ "id"
559
+ ]
560
+ }
561
+ },
562
+ "uniqueConstraints": {},
563
+ "policies": {},
564
+ "checkConstraints": {
565
+ "ck_vireo_notes_tone": {
566
+ "name": "ck_vireo_notes_tone",
567
+ "value": "(\"tone\")::text = ANY ((ARRAY['good'::character varying, 'bad'::character varying])::text[])"
568
+ }
569
+ },
570
+ "isRLSEnabled": false
571
+ },
572
+ "vireo.outcomes": {
573
+ "name": "outcomes",
574
+ "schema": "vireo",
575
+ "columns": {
576
+ "ship_id": {
577
+ "name": "ship_id",
578
+ "type": "integer",
579
+ "primaryKey": false,
580
+ "notNull": true
581
+ },
582
+ "segment": {
583
+ "name": "segment",
584
+ "type": "varchar(160)",
585
+ "primaryKey": false,
586
+ "notNull": true
587
+ },
588
+ "day": {
589
+ "name": "day",
590
+ "type": "date",
591
+ "primaryKey": false,
592
+ "notNull": true
593
+ },
594
+ "metric": {
595
+ "name": "metric",
596
+ "type": "varchar(32)",
597
+ "primaryKey": false,
598
+ "notNull": true
599
+ },
600
+ "value": {
601
+ "name": "value",
602
+ "type": "double precision",
603
+ "primaryKey": false,
604
+ "notNull": true
605
+ },
606
+ "fetched_at": {
607
+ "name": "fetched_at",
608
+ "type": "timestamp with time zone",
609
+ "primaryKey": false,
610
+ "notNull": true,
611
+ "default": "now()"
612
+ }
613
+ },
614
+ "indexes": {},
615
+ "foreignKeys": {
616
+ "fk_outcomes_ship_id_ships": {
617
+ "name": "fk_outcomes_ship_id_ships",
618
+ "tableFrom": "outcomes",
619
+ "tableTo": "ships",
620
+ "schemaTo": "vireo",
621
+ "columnsFrom": [
622
+ "ship_id"
623
+ ],
624
+ "columnsTo": [
625
+ "id"
626
+ ],
627
+ "onDelete": "cascade",
628
+ "onUpdate": "no action"
629
+ }
630
+ },
631
+ "compositePrimaryKeys": {
632
+ "pk_outcomes": {
633
+ "name": "pk_outcomes",
634
+ "columns": [
635
+ "ship_id",
636
+ "segment",
637
+ "day",
638
+ "metric"
639
+ ]
640
+ }
641
+ },
642
+ "uniqueConstraints": {},
643
+ "policies": {},
644
+ "checkConstraints": {},
645
+ "isRLSEnabled": false
646
+ },
647
+ "vireo.samples": {
648
+ "name": "samples",
649
+ "schema": "vireo",
650
+ "columns": {
651
+ "id": {
652
+ "name": "id",
653
+ "type": "serial",
654
+ "primaryKey": false,
655
+ "notNull": true
656
+ },
657
+ "batch_id": {
658
+ "name": "batch_id",
659
+ "type": "integer",
660
+ "primaryKey": false,
661
+ "notNull": true
662
+ },
663
+ "subject_id": {
664
+ "name": "subject_id",
665
+ "type": "integer",
666
+ "primaryKey": false,
667
+ "notNull": true
668
+ },
669
+ "position": {
670
+ "name": "position",
671
+ "type": "smallint",
672
+ "primaryKey": false,
673
+ "notNull": true,
674
+ "default": 0
675
+ },
676
+ "body": {
677
+ "name": "body",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": false
681
+ },
682
+ "media": {
683
+ "name": "media",
684
+ "type": "text",
685
+ "primaryKey": false,
686
+ "notNull": false
687
+ },
688
+ "poster": {
689
+ "name": "poster",
690
+ "type": "text",
691
+ "primaryKey": false,
692
+ "notNull": false
693
+ },
694
+ "source": {
695
+ "name": "source",
696
+ "type": "jsonb",
697
+ "primaryKey": false,
698
+ "notNull": false
699
+ },
700
+ "name": {
701
+ "name": "name",
702
+ "type": "varchar(60)",
703
+ "primaryKey": false,
704
+ "notNull": false
705
+ },
706
+ "guides": {
707
+ "name": "guides",
708
+ "type": "integer[]",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "default": "'{}'::integer[]"
712
+ },
713
+ "change": {
714
+ "name": "change",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": false
718
+ },
719
+ "agent": {
720
+ "name": "agent",
721
+ "type": "varchar(120)",
722
+ "primaryKey": false,
723
+ "notNull": false
724
+ },
725
+ "kept_at": {
726
+ "name": "kept_at",
727
+ "type": "timestamp with time zone",
728
+ "primaryKey": false,
729
+ "notNull": false
730
+ },
731
+ "created_at": {
732
+ "name": "created_at",
733
+ "type": "timestamp with time zone",
734
+ "primaryKey": false,
735
+ "notNull": true,
736
+ "default": "now()"
737
+ }
738
+ },
739
+ "indexes": {
740
+ "ix_vireo_samples_batch": {
741
+ "name": "ix_vireo_samples_batch",
742
+ "columns": [
743
+ {
744
+ "expression": "batch_id",
745
+ "isExpression": false,
746
+ "asc": true,
747
+ "nulls": "last"
748
+ }
749
+ ],
750
+ "isUnique": false,
751
+ "concurrently": false,
752
+ "method": "btree",
753
+ "with": {}
754
+ },
755
+ "ix_vireo_samples_subject": {
756
+ "name": "ix_vireo_samples_subject",
757
+ "columns": [
758
+ {
759
+ "expression": "subject_id",
760
+ "isExpression": false,
761
+ "asc": true,
762
+ "nulls": "last"
763
+ }
764
+ ],
765
+ "isUnique": false,
766
+ "concurrently": false,
767
+ "method": "btree",
768
+ "with": {}
769
+ }
770
+ },
771
+ "foreignKeys": {
772
+ "fk_samples_batch_id_batches": {
773
+ "name": "fk_samples_batch_id_batches",
774
+ "tableFrom": "samples",
775
+ "tableTo": "batches",
776
+ "schemaTo": "vireo",
777
+ "columnsFrom": [
778
+ "batch_id"
779
+ ],
780
+ "columnsTo": [
781
+ "id"
782
+ ],
783
+ "onDelete": "cascade",
784
+ "onUpdate": "no action"
785
+ },
786
+ "fk_samples_subject_id_subjects": {
787
+ "name": "fk_samples_subject_id_subjects",
788
+ "tableFrom": "samples",
789
+ "tableTo": "subjects",
790
+ "schemaTo": "vireo",
791
+ "columnsFrom": [
792
+ "subject_id"
793
+ ],
794
+ "columnsTo": [
795
+ "id"
796
+ ],
797
+ "onDelete": "cascade",
798
+ "onUpdate": "no action"
799
+ }
800
+ },
801
+ "compositePrimaryKeys": {
802
+ "pk_samples": {
803
+ "name": "pk_samples",
804
+ "columns": [
805
+ "id"
806
+ ]
807
+ }
808
+ },
809
+ "uniqueConstraints": {},
810
+ "policies": {},
811
+ "checkConstraints": {},
812
+ "isRLSEnabled": false
813
+ },
814
+ "vireo.ships": {
815
+ "name": "ships",
816
+ "schema": "vireo",
817
+ "columns": {
818
+ "id": {
819
+ "name": "id",
820
+ "type": "serial",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "sample_id": {
825
+ "name": "sample_id",
826
+ "type": "integer",
827
+ "primaryKey": false,
828
+ "notNull": true
829
+ },
830
+ "channel": {
831
+ "name": "channel",
832
+ "type": "varchar(32)",
833
+ "primaryKey": false,
834
+ "notNull": true
835
+ },
836
+ "target": {
837
+ "name": "target",
838
+ "type": "varchar(200)",
839
+ "primaryKey": false,
840
+ "notNull": true
841
+ },
842
+ "why": {
843
+ "name": "why",
844
+ "type": "text",
845
+ "primaryKey": false,
846
+ "notNull": false
847
+ },
848
+ "by": {
849
+ "name": "by",
850
+ "type": "varchar(320)",
851
+ "primaryKey": false,
852
+ "notNull": false
853
+ },
854
+ "started_at": {
855
+ "name": "started_at",
856
+ "type": "timestamp with time zone",
857
+ "primaryKey": false,
858
+ "notNull": true,
859
+ "default": "now()"
860
+ },
861
+ "ended_at": {
862
+ "name": "ended_at",
863
+ "type": "timestamp with time zone",
864
+ "primaryKey": false,
865
+ "notNull": false
866
+ }
867
+ },
868
+ "indexes": {
869
+ "ix_vireo_ships_sample": {
870
+ "name": "ix_vireo_ships_sample",
871
+ "columns": [
872
+ {
873
+ "expression": "sample_id",
874
+ "isExpression": false,
875
+ "asc": true,
876
+ "nulls": "last"
877
+ }
878
+ ],
879
+ "isUnique": false,
880
+ "concurrently": false,
881
+ "method": "btree",
882
+ "with": {}
883
+ }
884
+ },
885
+ "foreignKeys": {
886
+ "fk_ships_sample_id_samples": {
887
+ "name": "fk_ships_sample_id_samples",
888
+ "tableFrom": "ships",
889
+ "tableTo": "samples",
890
+ "schemaTo": "vireo",
891
+ "columnsFrom": [
892
+ "sample_id"
893
+ ],
894
+ "columnsTo": [
895
+ "id"
896
+ ],
897
+ "onDelete": "cascade",
898
+ "onUpdate": "no action"
899
+ }
900
+ },
901
+ "compositePrimaryKeys": {
902
+ "pk_ships": {
903
+ "name": "pk_ships",
904
+ "columns": [
905
+ "id"
906
+ ]
907
+ }
908
+ },
909
+ "uniqueConstraints": {
910
+ "uq_vireo_ships_target": {
911
+ "name": "uq_vireo_ships_target",
912
+ "nullsNotDistinct": false,
913
+ "columns": [
914
+ "channel",
915
+ "target",
916
+ "sample_id"
917
+ ]
918
+ }
919
+ },
920
+ "policies": {},
921
+ "checkConstraints": {},
922
+ "isRLSEnabled": false
923
+ },
924
+ "vireo.steers": {
925
+ "name": "steers",
926
+ "schema": "vireo",
927
+ "columns": {
928
+ "id": {
929
+ "name": "id",
930
+ "type": "serial",
931
+ "primaryKey": false,
932
+ "notNull": true
933
+ },
934
+ "subject_id": {
935
+ "name": "subject_id",
936
+ "type": "integer",
937
+ "primaryKey": false,
938
+ "notNull": true
939
+ },
940
+ "kind": {
941
+ "name": "kind",
942
+ "type": "varchar(8)",
943
+ "primaryKey": false,
944
+ "notNull": true
945
+ },
946
+ "sample_id": {
947
+ "name": "sample_id",
948
+ "type": "integer",
949
+ "primaryKey": false,
950
+ "notNull": false
951
+ },
952
+ "other_id": {
953
+ "name": "other_id",
954
+ "type": "integer",
955
+ "primaryKey": false,
956
+ "notNull": false
957
+ },
958
+ "width": {
959
+ "name": "width",
960
+ "type": "varchar(8)",
961
+ "primaryKey": false,
962
+ "notNull": false
963
+ },
964
+ "why": {
965
+ "name": "why",
966
+ "type": "text",
967
+ "primaryKey": false,
968
+ "notNull": false
969
+ },
970
+ "by": {
971
+ "name": "by",
972
+ "type": "varchar(320)",
973
+ "primaryKey": false,
974
+ "notNull": false
975
+ },
976
+ "created_at": {
977
+ "name": "created_at",
978
+ "type": "timestamp with time zone",
979
+ "primaryKey": false,
980
+ "notNull": true,
981
+ "default": "now()"
982
+ },
983
+ "ended_at": {
984
+ "name": "ended_at",
985
+ "type": "timestamp with time zone",
986
+ "primaryKey": false,
987
+ "notNull": false
988
+ },
989
+ "ended_by": {
990
+ "name": "ended_by",
991
+ "type": "integer",
992
+ "primaryKey": false,
993
+ "notNull": false
994
+ }
995
+ },
996
+ "indexes": {
997
+ "ix_vireo_steers_subject": {
998
+ "name": "ix_vireo_steers_subject",
999
+ "columns": [
1000
+ {
1001
+ "expression": "subject_id",
1002
+ "isExpression": false,
1003
+ "asc": true,
1004
+ "nulls": "last"
1005
+ },
1006
+ {
1007
+ "expression": "ended_at",
1008
+ "isExpression": false,
1009
+ "asc": true,
1010
+ "nulls": "last"
1011
+ }
1012
+ ],
1013
+ "isUnique": false,
1014
+ "concurrently": false,
1015
+ "method": "btree",
1016
+ "with": {}
1017
+ },
1018
+ "ix_vireo_steers_sample": {
1019
+ "name": "ix_vireo_steers_sample",
1020
+ "columns": [
1021
+ {
1022
+ "expression": "sample_id",
1023
+ "isExpression": false,
1024
+ "asc": true,
1025
+ "nulls": "last"
1026
+ }
1027
+ ],
1028
+ "isUnique": false,
1029
+ "concurrently": false,
1030
+ "method": "btree",
1031
+ "with": {}
1032
+ },
1033
+ "ix_vireo_steers_other": {
1034
+ "name": "ix_vireo_steers_other",
1035
+ "columns": [
1036
+ {
1037
+ "expression": "other_id",
1038
+ "isExpression": false,
1039
+ "asc": true,
1040
+ "nulls": "last"
1041
+ }
1042
+ ],
1043
+ "isUnique": false,
1044
+ "concurrently": false,
1045
+ "method": "btree",
1046
+ "with": {}
1047
+ },
1048
+ "ix_vireo_steers_ended_by": {
1049
+ "name": "ix_vireo_steers_ended_by",
1050
+ "columns": [
1051
+ {
1052
+ "expression": "ended_by",
1053
+ "isExpression": false,
1054
+ "asc": true,
1055
+ "nulls": "last"
1056
+ }
1057
+ ],
1058
+ "isUnique": false,
1059
+ "concurrently": false,
1060
+ "method": "btree",
1061
+ "with": {}
1062
+ }
1063
+ },
1064
+ "foreignKeys": {
1065
+ "fk_steers_subject_id_subjects": {
1066
+ "name": "fk_steers_subject_id_subjects",
1067
+ "tableFrom": "steers",
1068
+ "tableTo": "subjects",
1069
+ "schemaTo": "vireo",
1070
+ "columnsFrom": [
1071
+ "subject_id"
1072
+ ],
1073
+ "columnsTo": [
1074
+ "id"
1075
+ ],
1076
+ "onDelete": "cascade",
1077
+ "onUpdate": "no action"
1078
+ },
1079
+ "fk_steers_sample_id_samples": {
1080
+ "name": "fk_steers_sample_id_samples",
1081
+ "tableFrom": "steers",
1082
+ "tableTo": "samples",
1083
+ "schemaTo": "vireo",
1084
+ "columnsFrom": [
1085
+ "sample_id"
1086
+ ],
1087
+ "columnsTo": [
1088
+ "id"
1089
+ ],
1090
+ "onDelete": "cascade",
1091
+ "onUpdate": "no action"
1092
+ },
1093
+ "fk_steers_other_id_samples": {
1094
+ "name": "fk_steers_other_id_samples",
1095
+ "tableFrom": "steers",
1096
+ "tableTo": "samples",
1097
+ "schemaTo": "vireo",
1098
+ "columnsFrom": [
1099
+ "other_id"
1100
+ ],
1101
+ "columnsTo": [
1102
+ "id"
1103
+ ],
1104
+ "onDelete": "cascade",
1105
+ "onUpdate": "no action"
1106
+ },
1107
+ "fk_steers_ended_by_batches": {
1108
+ "name": "fk_steers_ended_by_batches",
1109
+ "tableFrom": "steers",
1110
+ "tableTo": "batches",
1111
+ "schemaTo": "vireo",
1112
+ "columnsFrom": [
1113
+ "ended_by"
1114
+ ],
1115
+ "columnsTo": [
1116
+ "id"
1117
+ ],
1118
+ "onDelete": "set null",
1119
+ "onUpdate": "no action"
1120
+ }
1121
+ },
1122
+ "compositePrimaryKeys": {
1123
+ "pk_steers": {
1124
+ "name": "pk_steers",
1125
+ "columns": [
1126
+ "id"
1127
+ ]
1128
+ }
1129
+ },
1130
+ "uniqueConstraints": {},
1131
+ "policies": {},
1132
+ "checkConstraints": {
1133
+ "ck_vireo_steers_kind": {
1134
+ "name": "ck_vireo_steers_kind",
1135
+ "value": "(\"kind\")::text = ANY ((ARRAY['pin'::character varying, 'prune'::character varying, 'cross'::character varying, 'width'::character varying])::text[])"
1136
+ },
1137
+ "ck_vireo_steers_width": {
1138
+ "name": "ck_vireo_steers_width",
1139
+ "value": "(\"width\")::text = ANY ((ARRAY['narrow'::character varying, 'normal'::character varying, 'wide'::character varying])::text[])"
1140
+ },
1141
+ "ck_vireo_steers_shape": {
1142
+ "name": "ck_vireo_steers_shape",
1143
+ "value": "CASE \"kind\"\n WHEN 'width' THEN \"width\" IS NOT NULL AND \"sample_id\" IS NULL AND \"other_id\" IS NULL\n WHEN 'cross' THEN \"width\" IS NULL AND \"sample_id\" IS NOT NULL AND \"other_id\" IS NOT NULL AND \"sample_id\" <> \"other_id\"\n ELSE \"width\" IS NULL AND \"sample_id\" IS NOT NULL AND \"other_id\" IS NULL END"
1144
+ }
1145
+ },
1146
+ "isRLSEnabled": false
1147
+ },
1148
+ "vireo.subjects": {
1149
+ "name": "subjects",
1150
+ "schema": "vireo",
1151
+ "columns": {
1152
+ "id": {
1153
+ "name": "id",
1154
+ "type": "serial",
1155
+ "primaryKey": false,
1156
+ "notNull": true
1157
+ },
1158
+ "slug": {
1159
+ "name": "slug",
1160
+ "type": "varchar(60)",
1161
+ "primaryKey": false,
1162
+ "notNull": true
1163
+ },
1164
+ "name": {
1165
+ "name": "name",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": true
1169
+ },
1170
+ "kind": {
1171
+ "name": "kind",
1172
+ "type": "varchar(8)",
1173
+ "primaryKey": false,
1174
+ "notNull": true
1175
+ },
1176
+ "brief": {
1177
+ "name": "brief",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": false
1181
+ },
1182
+ "seeds": {
1183
+ "name": "seeds",
1184
+ "type": "jsonb",
1185
+ "primaryKey": false,
1186
+ "notNull": true,
1187
+ "default": "'[]'::jsonb"
1188
+ },
1189
+ "state": {
1190
+ "name": "state",
1191
+ "type": "varchar(8)",
1192
+ "primaryKey": false,
1193
+ "notNull": true,
1194
+ "default": "'open'"
1195
+ },
1196
+ "by": {
1197
+ "name": "by",
1198
+ "type": "varchar(320)",
1199
+ "primaryKey": false,
1200
+ "notNull": false
1201
+ },
1202
+ "created_at": {
1203
+ "name": "created_at",
1204
+ "type": "timestamp with time zone",
1205
+ "primaryKey": false,
1206
+ "notNull": true,
1207
+ "default": "now()"
1208
+ }
1209
+ },
1210
+ "indexes": {},
1211
+ "foreignKeys": {},
1212
+ "compositePrimaryKeys": {
1213
+ "pk_subjects": {
1214
+ "name": "pk_subjects",
1215
+ "columns": [
1216
+ "id"
1217
+ ]
1218
+ }
1219
+ },
1220
+ "uniqueConstraints": {
1221
+ "uq_vireo_subjects_slug": {
1222
+ "name": "uq_vireo_subjects_slug",
1223
+ "nullsNotDistinct": false,
1224
+ "columns": [
1225
+ "slug"
1226
+ ]
1227
+ }
1228
+ },
1229
+ "policies": {},
1230
+ "checkConstraints": {
1231
+ "ck_vireo_subjects_kind": {
1232
+ "name": "ck_vireo_subjects_kind",
1233
+ "value": "(\"kind\")::text = ANY ((ARRAY['text'::character varying, 'image'::character varying, 'video'::character varying, 'page'::character varying])::text[])"
1234
+ },
1235
+ "ck_vireo_subjects_state": {
1236
+ "name": "ck_vireo_subjects_state",
1237
+ "value": "(\"state\")::text = ANY ((ARRAY['open'::character varying, 'paused'::character varying, 'done'::character varying])::text[])"
1238
+ }
1239
+ },
1240
+ "isRLSEnabled": false
1241
+ }
1242
+ },
1243
+ "enums": {},
1244
+ "schemas": {
1245
+ "vireo": "vireo"
1246
+ },
1247
+ "sequences": {},
1248
+ "roles": {},
1249
+ "policies": {},
1250
+ "views": {},
1251
+ "_meta": {
1252
+ "columns": {},
1253
+ "schemas": {},
1254
+ "tables": {}
1255
+ }
1256
+ }