@chaos-overlords/storage 0.9.9 → 0.9.11

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,1001 @@
1
+ {
2
+ "id": "26b7d700-72fa-466e-9e44-f54bc03d4b15",
3
+ "prevId": "57a5f971-553d-4d2d-99f7-8a77f192ecfe",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.match_events": {
8
+ "name": "match_events",
9
+ "schema": "",
10
+ "columns": {
11
+ "match_id": {
12
+ "name": "match_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "seq": {
18
+ "name": "seq",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "type": {
24
+ "name": "type",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "payload": {
30
+ "name": "payload",
31
+ "type": "jsonb",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "created_at": {
36
+ "name": "created_at",
37
+ "type": "timestamp with time zone",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "dedupe_key": {
42
+ "name": "dedupe_key",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ }
47
+ },
48
+ "indexes": {
49
+ "match_events_dedupe_idx": {
50
+ "name": "match_events_dedupe_idx",
51
+ "columns": [
52
+ {
53
+ "expression": "match_id",
54
+ "isExpression": false,
55
+ "asc": true,
56
+ "nulls": "last"
57
+ },
58
+ {
59
+ "expression": "dedupe_key",
60
+ "isExpression": false,
61
+ "asc": true,
62
+ "nulls": "last"
63
+ }
64
+ ],
65
+ "isUnique": true,
66
+ "concurrently": false,
67
+ "method": "btree",
68
+ "with": {}
69
+ },
70
+ "match_events_type_idx": {
71
+ "name": "match_events_type_idx",
72
+ "columns": [
73
+ {
74
+ "expression": "match_id",
75
+ "isExpression": false,
76
+ "asc": true,
77
+ "nulls": "last"
78
+ },
79
+ {
80
+ "expression": "type",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ },
85
+ {
86
+ "expression": "seq",
87
+ "isExpression": false,
88
+ "asc": true,
89
+ "nulls": "last"
90
+ }
91
+ ],
92
+ "isUnique": false,
93
+ "concurrently": false,
94
+ "method": "btree",
95
+ "with": {}
96
+ }
97
+ },
98
+ "foreignKeys": {
99
+ "match_events_match_id_matches_id_fk": {
100
+ "name": "match_events_match_id_matches_id_fk",
101
+ "tableFrom": "match_events",
102
+ "tableTo": "matches",
103
+ "columnsFrom": [
104
+ "match_id"
105
+ ],
106
+ "columnsTo": [
107
+ "id"
108
+ ],
109
+ "onDelete": "cascade",
110
+ "onUpdate": "no action"
111
+ }
112
+ },
113
+ "compositePrimaryKeys": {
114
+ "match_events_match_id_seq_pk": {
115
+ "name": "match_events_match_id_seq_pk",
116
+ "columns": [
117
+ "match_id",
118
+ "seq"
119
+ ]
120
+ }
121
+ },
122
+ "uniqueConstraints": {},
123
+ "policies": {},
124
+ "checkConstraints": {},
125
+ "isRLSEnabled": false
126
+ },
127
+ "public.matches": {
128
+ "name": "matches",
129
+ "schema": "",
130
+ "columns": {
131
+ "id": {
132
+ "name": "id",
133
+ "type": "text",
134
+ "primaryKey": true,
135
+ "notNull": true
136
+ },
137
+ "protocol_version": {
138
+ "name": "protocol_version",
139
+ "type": "integer",
140
+ "primaryKey": false,
141
+ "notNull": true,
142
+ "default": 1
143
+ },
144
+ "session_version": {
145
+ "name": "session_version",
146
+ "type": "integer",
147
+ "primaryKey": false,
148
+ "notNull": true,
149
+ "default": 1
150
+ },
151
+ "status": {
152
+ "name": "status",
153
+ "type": "text",
154
+ "primaryKey": false,
155
+ "notNull": true
156
+ },
157
+ "name": {
158
+ "name": "name",
159
+ "type": "text",
160
+ "primaryKey": false,
161
+ "notNull": true
162
+ },
163
+ "visibility": {
164
+ "name": "visibility",
165
+ "type": "text",
166
+ "primaryKey": false,
167
+ "notNull": true
168
+ },
169
+ "max_players": {
170
+ "name": "max_players",
171
+ "type": "integer",
172
+ "primaryKey": false,
173
+ "notNull": true
174
+ },
175
+ "settings": {
176
+ "name": "settings",
177
+ "type": "jsonb",
178
+ "primaryKey": false,
179
+ "notNull": true
180
+ },
181
+ "host_player_id": {
182
+ "name": "host_player_id",
183
+ "type": "text",
184
+ "primaryKey": false,
185
+ "notNull": true
186
+ },
187
+ "join_code": {
188
+ "name": "join_code",
189
+ "type": "text",
190
+ "primaryKey": false,
191
+ "notNull": true
192
+ },
193
+ "password_hash": {
194
+ "name": "password_hash",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": false
198
+ },
199
+ "seed": {
200
+ "name": "seed",
201
+ "type": "integer",
202
+ "primaryKey": false,
203
+ "notNull": false
204
+ },
205
+ "current_turn": {
206
+ "name": "current_turn",
207
+ "type": "integer",
208
+ "primaryKey": false,
209
+ "notNull": true,
210
+ "default": 0
211
+ },
212
+ "seat_count": {
213
+ "name": "seat_count",
214
+ "type": "integer",
215
+ "primaryKey": false,
216
+ "notNull": true,
217
+ "default": 1
218
+ },
219
+ "join_counter": {
220
+ "name": "join_counter",
221
+ "type": "integer",
222
+ "primaryKey": false,
223
+ "notNull": true,
224
+ "default": 1
225
+ },
226
+ "created_at": {
227
+ "name": "created_at",
228
+ "type": "timestamp with time zone",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ },
232
+ "updated_at": {
233
+ "name": "updated_at",
234
+ "type": "timestamp with time zone",
235
+ "primaryKey": false,
236
+ "notNull": true
237
+ }
238
+ },
239
+ "indexes": {
240
+ "matches_status_updated_idx": {
241
+ "name": "matches_status_updated_idx",
242
+ "columns": [
243
+ {
244
+ "expression": "status",
245
+ "isExpression": false,
246
+ "asc": true,
247
+ "nulls": "last"
248
+ },
249
+ {
250
+ "expression": "updated_at",
251
+ "isExpression": false,
252
+ "asc": true,
253
+ "nulls": "last"
254
+ }
255
+ ],
256
+ "isUnique": false,
257
+ "concurrently": false,
258
+ "method": "btree",
259
+ "with": {}
260
+ },
261
+ "matches_lobby_idx": {
262
+ "name": "matches_lobby_idx",
263
+ "columns": [
264
+ {
265
+ "expression": "status",
266
+ "isExpression": false,
267
+ "asc": true,
268
+ "nulls": "last"
269
+ },
270
+ {
271
+ "expression": "visibility",
272
+ "isExpression": false,
273
+ "asc": true,
274
+ "nulls": "last"
275
+ },
276
+ {
277
+ "expression": "created_at",
278
+ "isExpression": false,
279
+ "asc": true,
280
+ "nulls": "last"
281
+ }
282
+ ],
283
+ "isUnique": false,
284
+ "concurrently": false,
285
+ "method": "btree",
286
+ "with": {}
287
+ }
288
+ },
289
+ "foreignKeys": {},
290
+ "compositePrimaryKeys": {},
291
+ "uniqueConstraints": {
292
+ "matches_join_code_unique": {
293
+ "name": "matches_join_code_unique",
294
+ "nullsNotDistinct": false,
295
+ "columns": [
296
+ "join_code"
297
+ ]
298
+ }
299
+ },
300
+ "policies": {},
301
+ "checkConstraints": {},
302
+ "isRLSEnabled": false
303
+ },
304
+ "public.players": {
305
+ "name": "players",
306
+ "schema": "",
307
+ "columns": {
308
+ "id": {
309
+ "name": "id",
310
+ "type": "text",
311
+ "primaryKey": true,
312
+ "notNull": true
313
+ },
314
+ "match_id": {
315
+ "name": "match_id",
316
+ "type": "text",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ },
320
+ "slot": {
321
+ "name": "slot",
322
+ "type": "integer",
323
+ "primaryKey": false,
324
+ "notNull": true,
325
+ "default": -1
326
+ },
327
+ "join_order": {
328
+ "name": "join_order",
329
+ "type": "integer",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "default": 0
333
+ },
334
+ "display_name": {
335
+ "name": "display_name",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true
339
+ },
340
+ "portrait_id": {
341
+ "name": "portrait_id",
342
+ "type": "integer",
343
+ "primaryKey": false,
344
+ "notNull": true,
345
+ "default": 0
346
+ },
347
+ "token_hash": {
348
+ "name": "token_hash",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": false
352
+ },
353
+ "status": {
354
+ "name": "status",
355
+ "type": "text",
356
+ "primaryKey": false,
357
+ "notNull": true
358
+ },
359
+ "joined_at": {
360
+ "name": "joined_at",
361
+ "type": "timestamp with time zone",
362
+ "primaryKey": false,
363
+ "notNull": true
364
+ }
365
+ },
366
+ "indexes": {
367
+ "players_match_idx": {
368
+ "name": "players_match_idx",
369
+ "columns": [
370
+ {
371
+ "expression": "match_id",
372
+ "isExpression": false,
373
+ "asc": true,
374
+ "nulls": "last"
375
+ }
376
+ ],
377
+ "isUnique": false,
378
+ "concurrently": false,
379
+ "method": "btree",
380
+ "with": {}
381
+ }
382
+ },
383
+ "foreignKeys": {
384
+ "players_match_id_matches_id_fk": {
385
+ "name": "players_match_id_matches_id_fk",
386
+ "tableFrom": "players",
387
+ "tableTo": "matches",
388
+ "columnsFrom": [
389
+ "match_id"
390
+ ],
391
+ "columnsTo": [
392
+ "id"
393
+ ],
394
+ "onDelete": "cascade",
395
+ "onUpdate": "no action"
396
+ }
397
+ },
398
+ "compositePrimaryKeys": {},
399
+ "uniqueConstraints": {
400
+ "players_token_hash_unique": {
401
+ "name": "players_token_hash_unique",
402
+ "nullsNotDistinct": false,
403
+ "columns": [
404
+ "token_hash"
405
+ ]
406
+ }
407
+ },
408
+ "policies": {},
409
+ "checkConstraints": {},
410
+ "isRLSEnabled": false
411
+ },
412
+ "public.rate_limit_windows": {
413
+ "name": "rate_limit_windows",
414
+ "schema": "",
415
+ "columns": {
416
+ "key": {
417
+ "name": "key",
418
+ "type": "text",
419
+ "primaryKey": true,
420
+ "notNull": true
421
+ },
422
+ "window_start": {
423
+ "name": "window_start",
424
+ "type": "bigint",
425
+ "primaryKey": false,
426
+ "notNull": true
427
+ },
428
+ "reset_at": {
429
+ "name": "reset_at",
430
+ "type": "bigint",
431
+ "primaryKey": false,
432
+ "notNull": true
433
+ },
434
+ "count": {
435
+ "name": "count",
436
+ "type": "integer",
437
+ "primaryKey": false,
438
+ "notNull": true
439
+ },
440
+ "allowed": {
441
+ "name": "allowed",
442
+ "type": "boolean",
443
+ "primaryKey": false,
444
+ "notNull": true
445
+ }
446
+ },
447
+ "indexes": {
448
+ "rate_limit_windows_reset_idx": {
449
+ "name": "rate_limit_windows_reset_idx",
450
+ "columns": [
451
+ {
452
+ "expression": "reset_at",
453
+ "isExpression": false,
454
+ "asc": true,
455
+ "nulls": "last"
456
+ }
457
+ ],
458
+ "isUnique": false,
459
+ "concurrently": false,
460
+ "method": "btree",
461
+ "with": {}
462
+ }
463
+ },
464
+ "foreignKeys": {},
465
+ "compositePrimaryKeys": {},
466
+ "uniqueConstraints": {},
467
+ "policies": {},
468
+ "checkConstraints": {},
469
+ "isRLSEnabled": false
470
+ },
471
+ "public.snapshots": {
472
+ "name": "snapshots",
473
+ "schema": "",
474
+ "columns": {
475
+ "match_id": {
476
+ "name": "match_id",
477
+ "type": "text",
478
+ "primaryKey": false,
479
+ "notNull": true
480
+ },
481
+ "turn": {
482
+ "name": "turn",
483
+ "type": "integer",
484
+ "primaryKey": false,
485
+ "notNull": true
486
+ },
487
+ "format_version": {
488
+ "name": "format_version",
489
+ "type": "integer",
490
+ "primaryKey": false,
491
+ "notNull": true
492
+ },
493
+ "protocol_version": {
494
+ "name": "protocol_version",
495
+ "type": "integer",
496
+ "primaryKey": false,
497
+ "notNull": true,
498
+ "default": 1
499
+ },
500
+ "session_version": {
501
+ "name": "session_version",
502
+ "type": "integer",
503
+ "primaryKey": false,
504
+ "notNull": true,
505
+ "default": 1
506
+ },
507
+ "state_hash": {
508
+ "name": "state_hash",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": true
512
+ },
513
+ "uploaded_by_player_id": {
514
+ "name": "uploaded_by_player_id",
515
+ "type": "text",
516
+ "primaryKey": false,
517
+ "notNull": true
518
+ },
519
+ "uploaded_at": {
520
+ "name": "uploaded_at",
521
+ "type": "timestamp with time zone",
522
+ "primaryKey": false,
523
+ "notNull": true
524
+ },
525
+ "body": {
526
+ "name": "body",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true
530
+ }
531
+ },
532
+ "indexes": {},
533
+ "foreignKeys": {
534
+ "snapshots_match_id_matches_id_fk": {
535
+ "name": "snapshots_match_id_matches_id_fk",
536
+ "tableFrom": "snapshots",
537
+ "tableTo": "matches",
538
+ "columnsFrom": [
539
+ "match_id"
540
+ ],
541
+ "columnsTo": [
542
+ "id"
543
+ ],
544
+ "onDelete": "cascade",
545
+ "onUpdate": "no action"
546
+ }
547
+ },
548
+ "compositePrimaryKeys": {
549
+ "snapshots_match_id_turn_pk": {
550
+ "name": "snapshots_match_id_turn_pk",
551
+ "columns": [
552
+ "match_id",
553
+ "turn"
554
+ ]
555
+ }
556
+ },
557
+ "uniqueConstraints": {},
558
+ "policies": {},
559
+ "checkConstraints": {},
560
+ "isRLSEnabled": false
561
+ },
562
+ "public.takeover_prompts": {
563
+ "name": "takeover_prompts",
564
+ "schema": "",
565
+ "columns": {
566
+ "match_id": {
567
+ "name": "match_id",
568
+ "type": "text",
569
+ "primaryKey": false,
570
+ "notNull": true
571
+ },
572
+ "player_id": {
573
+ "name": "player_id",
574
+ "type": "text",
575
+ "primaryKey": false,
576
+ "notNull": true
577
+ },
578
+ "turn": {
579
+ "name": "turn",
580
+ "type": "integer",
581
+ "primaryKey": false,
582
+ "notNull": true
583
+ },
584
+ "opened_at": {
585
+ "name": "opened_at",
586
+ "type": "timestamp with time zone",
587
+ "primaryKey": false,
588
+ "notNull": true
589
+ },
590
+ "announced_at": {
591
+ "name": "announced_at",
592
+ "type": "timestamp with time zone",
593
+ "primaryKey": false,
594
+ "notNull": false
595
+ }
596
+ },
597
+ "indexes": {},
598
+ "foreignKeys": {
599
+ "takeover_prompts_match_id_matches_id_fk": {
600
+ "name": "takeover_prompts_match_id_matches_id_fk",
601
+ "tableFrom": "takeover_prompts",
602
+ "tableTo": "matches",
603
+ "columnsFrom": [
604
+ "match_id"
605
+ ],
606
+ "columnsTo": [
607
+ "id"
608
+ ],
609
+ "onDelete": "cascade",
610
+ "onUpdate": "no action"
611
+ }
612
+ },
613
+ "compositePrimaryKeys": {
614
+ "takeover_prompts_match_id_player_id_pk": {
615
+ "name": "takeover_prompts_match_id_player_id_pk",
616
+ "columns": [
617
+ "match_id",
618
+ "player_id"
619
+ ]
620
+ }
621
+ },
622
+ "uniqueConstraints": {},
623
+ "policies": {},
624
+ "checkConstraints": {},
625
+ "isRLSEnabled": false
626
+ },
627
+ "public.takeover_votes": {
628
+ "name": "takeover_votes",
629
+ "schema": "",
630
+ "columns": {
631
+ "match_id": {
632
+ "name": "match_id",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": true
636
+ },
637
+ "target_player_id": {
638
+ "name": "target_player_id",
639
+ "type": "text",
640
+ "primaryKey": false,
641
+ "notNull": true
642
+ },
643
+ "voter_player_id": {
644
+ "name": "voter_player_id",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": true
648
+ },
649
+ "decision": {
650
+ "name": "decision",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": true
654
+ },
655
+ "cast_at": {
656
+ "name": "cast_at",
657
+ "type": "timestamp with time zone",
658
+ "primaryKey": false,
659
+ "notNull": true
660
+ }
661
+ },
662
+ "indexes": {},
663
+ "foreignKeys": {
664
+ "takeover_votes_match_id_matches_id_fk": {
665
+ "name": "takeover_votes_match_id_matches_id_fk",
666
+ "tableFrom": "takeover_votes",
667
+ "tableTo": "matches",
668
+ "columnsFrom": [
669
+ "match_id"
670
+ ],
671
+ "columnsTo": [
672
+ "id"
673
+ ],
674
+ "onDelete": "cascade",
675
+ "onUpdate": "no action"
676
+ }
677
+ },
678
+ "compositePrimaryKeys": {
679
+ "takeover_votes_match_id_target_player_id_voter_player_id_pk": {
680
+ "name": "takeover_votes_match_id_target_player_id_voter_player_id_pk",
681
+ "columns": [
682
+ "match_id",
683
+ "target_player_id",
684
+ "voter_player_id"
685
+ ]
686
+ }
687
+ },
688
+ "uniqueConstraints": {},
689
+ "policies": {},
690
+ "checkConstraints": {},
691
+ "isRLSEnabled": false
692
+ },
693
+ "public.turn_orders": {
694
+ "name": "turn_orders",
695
+ "schema": "",
696
+ "columns": {
697
+ "match_id": {
698
+ "name": "match_id",
699
+ "type": "text",
700
+ "primaryKey": false,
701
+ "notNull": true
702
+ },
703
+ "turn": {
704
+ "name": "turn",
705
+ "type": "integer",
706
+ "primaryKey": false,
707
+ "notNull": true
708
+ },
709
+ "player_id": {
710
+ "name": "player_id",
711
+ "type": "text",
712
+ "primaryKey": false,
713
+ "notNull": true
714
+ },
715
+ "orders": {
716
+ "name": "orders",
717
+ "type": "jsonb",
718
+ "primaryKey": false,
719
+ "notNull": false
720
+ },
721
+ "orders_hash": {
722
+ "name": "orders_hash",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": false
726
+ },
727
+ "ready": {
728
+ "name": "ready",
729
+ "type": "boolean",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "default": false
733
+ },
734
+ "submitted_at": {
735
+ "name": "submitted_at",
736
+ "type": "timestamp with time zone",
737
+ "primaryKey": false,
738
+ "notNull": false
739
+ }
740
+ },
741
+ "indexes": {},
742
+ "foreignKeys": {
743
+ "turn_orders_match_id_matches_id_fk": {
744
+ "name": "turn_orders_match_id_matches_id_fk",
745
+ "tableFrom": "turn_orders",
746
+ "tableTo": "matches",
747
+ "columnsFrom": [
748
+ "match_id"
749
+ ],
750
+ "columnsTo": [
751
+ "id"
752
+ ],
753
+ "onDelete": "cascade",
754
+ "onUpdate": "no action"
755
+ }
756
+ },
757
+ "compositePrimaryKeys": {
758
+ "turn_orders_match_id_turn_player_id_pk": {
759
+ "name": "turn_orders_match_id_turn_player_id_pk",
760
+ "columns": [
761
+ "match_id",
762
+ "turn",
763
+ "player_id"
764
+ ]
765
+ }
766
+ },
767
+ "uniqueConstraints": {},
768
+ "policies": {},
769
+ "checkConstraints": {},
770
+ "isRLSEnabled": false
771
+ },
772
+ "public.turn_reports": {
773
+ "name": "turn_reports",
774
+ "schema": "",
775
+ "columns": {
776
+ "match_id": {
777
+ "name": "match_id",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true
781
+ },
782
+ "turn": {
783
+ "name": "turn",
784
+ "type": "integer",
785
+ "primaryKey": false,
786
+ "notNull": true
787
+ },
788
+ "player_id": {
789
+ "name": "player_id",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true
793
+ },
794
+ "state_hash": {
795
+ "name": "state_hash",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true
799
+ },
800
+ "finished": {
801
+ "name": "finished",
802
+ "type": "boolean",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "default": false
806
+ },
807
+ "reported_at": {
808
+ "name": "reported_at",
809
+ "type": "timestamp with time zone",
810
+ "primaryKey": false,
811
+ "notNull": true
812
+ }
813
+ },
814
+ "indexes": {},
815
+ "foreignKeys": {
816
+ "turn_reports_match_id_matches_id_fk": {
817
+ "name": "turn_reports_match_id_matches_id_fk",
818
+ "tableFrom": "turn_reports",
819
+ "tableTo": "matches",
820
+ "columnsFrom": [
821
+ "match_id"
822
+ ],
823
+ "columnsTo": [
824
+ "id"
825
+ ],
826
+ "onDelete": "cascade",
827
+ "onUpdate": "no action"
828
+ }
829
+ },
830
+ "compositePrimaryKeys": {
831
+ "turn_reports_match_id_turn_player_id_pk": {
832
+ "name": "turn_reports_match_id_turn_player_id_pk",
833
+ "columns": [
834
+ "match_id",
835
+ "turn",
836
+ "player_id"
837
+ ]
838
+ }
839
+ },
840
+ "uniqueConstraints": {},
841
+ "policies": {},
842
+ "checkConstraints": {},
843
+ "isRLSEnabled": false
844
+ },
845
+ "public.turns": {
846
+ "name": "turns",
847
+ "schema": "",
848
+ "columns": {
849
+ "match_id": {
850
+ "name": "match_id",
851
+ "type": "text",
852
+ "primaryKey": false,
853
+ "notNull": true
854
+ },
855
+ "number": {
856
+ "name": "number",
857
+ "type": "integer",
858
+ "primaryKey": false,
859
+ "notNull": true
860
+ },
861
+ "status": {
862
+ "name": "status",
863
+ "type": "text",
864
+ "primaryKey": false,
865
+ "notNull": true
866
+ },
867
+ "opened_at": {
868
+ "name": "opened_at",
869
+ "type": "timestamp with time zone",
870
+ "primaryKey": false,
871
+ "notNull": true
872
+ },
873
+ "deadline_at": {
874
+ "name": "deadline_at",
875
+ "type": "timestamp with time zone",
876
+ "primaryKey": false,
877
+ "notNull": false
878
+ },
879
+ "sealed_at": {
880
+ "name": "sealed_at",
881
+ "type": "timestamp with time zone",
882
+ "primaryKey": false,
883
+ "notNull": false
884
+ },
885
+ "order_set_hash": {
886
+ "name": "order_set_hash",
887
+ "type": "text",
888
+ "primaryKey": false,
889
+ "notNull": false
890
+ },
891
+ "sealed_slots": {
892
+ "name": "sealed_slots",
893
+ "type": "jsonb",
894
+ "primaryKey": false,
895
+ "notNull": false
896
+ },
897
+ "state_hash": {
898
+ "name": "state_hash",
899
+ "type": "text",
900
+ "primaryKey": false,
901
+ "notNull": false
902
+ },
903
+ "desynced_at": {
904
+ "name": "desynced_at",
905
+ "type": "timestamp with time zone",
906
+ "primaryKey": false,
907
+ "notNull": false
908
+ },
909
+ "settled_at": {
910
+ "name": "settled_at",
911
+ "type": "timestamp with time zone",
912
+ "primaryKey": false,
913
+ "notNull": false
914
+ }
915
+ },
916
+ "indexes": {
917
+ "turns_deadline_idx": {
918
+ "name": "turns_deadline_idx",
919
+ "columns": [
920
+ {
921
+ "expression": "status",
922
+ "isExpression": false,
923
+ "asc": true,
924
+ "nulls": "last"
925
+ },
926
+ {
927
+ "expression": "deadline_at",
928
+ "isExpression": false,
929
+ "asc": true,
930
+ "nulls": "last"
931
+ }
932
+ ],
933
+ "isUnique": false,
934
+ "concurrently": false,
935
+ "method": "btree",
936
+ "with": {}
937
+ },
938
+ "turns_settled_idx": {
939
+ "name": "turns_settled_idx",
940
+ "columns": [
941
+ {
942
+ "expression": "status",
943
+ "isExpression": false,
944
+ "asc": true,
945
+ "nulls": "last"
946
+ },
947
+ {
948
+ "expression": "settled_at",
949
+ "isExpression": false,
950
+ "asc": true,
951
+ "nulls": "last"
952
+ }
953
+ ],
954
+ "isUnique": false,
955
+ "concurrently": false,
956
+ "method": "btree",
957
+ "with": {}
958
+ }
959
+ },
960
+ "foreignKeys": {
961
+ "turns_match_id_matches_id_fk": {
962
+ "name": "turns_match_id_matches_id_fk",
963
+ "tableFrom": "turns",
964
+ "tableTo": "matches",
965
+ "columnsFrom": [
966
+ "match_id"
967
+ ],
968
+ "columnsTo": [
969
+ "id"
970
+ ],
971
+ "onDelete": "cascade",
972
+ "onUpdate": "no action"
973
+ }
974
+ },
975
+ "compositePrimaryKeys": {
976
+ "turns_match_id_number_pk": {
977
+ "name": "turns_match_id_number_pk",
978
+ "columns": [
979
+ "match_id",
980
+ "number"
981
+ ]
982
+ }
983
+ },
984
+ "uniqueConstraints": {},
985
+ "policies": {},
986
+ "checkConstraints": {},
987
+ "isRLSEnabled": false
988
+ }
989
+ },
990
+ "enums": {},
991
+ "schemas": {},
992
+ "sequences": {},
993
+ "roles": {},
994
+ "policies": {},
995
+ "views": {},
996
+ "_meta": {
997
+ "columns": {},
998
+ "schemas": {},
999
+ "tables": {}
1000
+ }
1001
+ }