@chaos-overlords/storage 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,702 @@
1
+ {
2
+ "id": "31d09ef4-7659-4d72-86b4-809ea78b6542",
3
+ "prevId": "6077cf1f-0ce9-487c-b544-fb02befd2dbe",
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
+ },
42
+ "indexes": {},
43
+ "foreignKeys": {
44
+ "match_events_match_id_matches_id_fk": {
45
+ "name": "match_events_match_id_matches_id_fk",
46
+ "tableFrom": "match_events",
47
+ "tableTo": "matches",
48
+ "columnsFrom": [
49
+ "match_id"
50
+ ],
51
+ "columnsTo": [
52
+ "id"
53
+ ],
54
+ "onDelete": "cascade",
55
+ "onUpdate": "no action"
56
+ }
57
+ },
58
+ "compositePrimaryKeys": {
59
+ "match_events_match_id_seq_pk": {
60
+ "name": "match_events_match_id_seq_pk",
61
+ "columns": [
62
+ "match_id",
63
+ "seq"
64
+ ]
65
+ }
66
+ },
67
+ "uniqueConstraints": {},
68
+ "policies": {},
69
+ "checkConstraints": {},
70
+ "isRLSEnabled": false
71
+ },
72
+ "public.matches": {
73
+ "name": "matches",
74
+ "schema": "",
75
+ "columns": {
76
+ "id": {
77
+ "name": "id",
78
+ "type": "text",
79
+ "primaryKey": true,
80
+ "notNull": true
81
+ },
82
+ "protocol_version": {
83
+ "name": "protocol_version",
84
+ "type": "integer",
85
+ "primaryKey": false,
86
+ "notNull": true,
87
+ "default": 1
88
+ },
89
+ "status": {
90
+ "name": "status",
91
+ "type": "text",
92
+ "primaryKey": false,
93
+ "notNull": true
94
+ },
95
+ "name": {
96
+ "name": "name",
97
+ "type": "text",
98
+ "primaryKey": false,
99
+ "notNull": true
100
+ },
101
+ "visibility": {
102
+ "name": "visibility",
103
+ "type": "text",
104
+ "primaryKey": false,
105
+ "notNull": true
106
+ },
107
+ "max_players": {
108
+ "name": "max_players",
109
+ "type": "integer",
110
+ "primaryKey": false,
111
+ "notNull": true
112
+ },
113
+ "settings": {
114
+ "name": "settings",
115
+ "type": "jsonb",
116
+ "primaryKey": false,
117
+ "notNull": true
118
+ },
119
+ "host_player_id": {
120
+ "name": "host_player_id",
121
+ "type": "text",
122
+ "primaryKey": false,
123
+ "notNull": true
124
+ },
125
+ "join_code": {
126
+ "name": "join_code",
127
+ "type": "text",
128
+ "primaryKey": false,
129
+ "notNull": true
130
+ },
131
+ "password_hash": {
132
+ "name": "password_hash",
133
+ "type": "text",
134
+ "primaryKey": false,
135
+ "notNull": false
136
+ },
137
+ "seed": {
138
+ "name": "seed",
139
+ "type": "integer",
140
+ "primaryKey": false,
141
+ "notNull": false
142
+ },
143
+ "current_turn": {
144
+ "name": "current_turn",
145
+ "type": "integer",
146
+ "primaryKey": false,
147
+ "notNull": true,
148
+ "default": 0
149
+ },
150
+ "seat_count": {
151
+ "name": "seat_count",
152
+ "type": "integer",
153
+ "primaryKey": false,
154
+ "notNull": true,
155
+ "default": 1
156
+ },
157
+ "join_counter": {
158
+ "name": "join_counter",
159
+ "type": "integer",
160
+ "primaryKey": false,
161
+ "notNull": true,
162
+ "default": 1
163
+ },
164
+ "created_at": {
165
+ "name": "created_at",
166
+ "type": "timestamp with time zone",
167
+ "primaryKey": false,
168
+ "notNull": true
169
+ },
170
+ "updated_at": {
171
+ "name": "updated_at",
172
+ "type": "timestamp with time zone",
173
+ "primaryKey": false,
174
+ "notNull": true
175
+ }
176
+ },
177
+ "indexes": {
178
+ "matches_status_updated_idx": {
179
+ "name": "matches_status_updated_idx",
180
+ "columns": [
181
+ {
182
+ "expression": "status",
183
+ "isExpression": false,
184
+ "asc": true,
185
+ "nulls": "last"
186
+ },
187
+ {
188
+ "expression": "updated_at",
189
+ "isExpression": false,
190
+ "asc": true,
191
+ "nulls": "last"
192
+ }
193
+ ],
194
+ "isUnique": false,
195
+ "concurrently": false,
196
+ "method": "btree",
197
+ "with": {}
198
+ },
199
+ "matches_lobby_idx": {
200
+ "name": "matches_lobby_idx",
201
+ "columns": [
202
+ {
203
+ "expression": "status",
204
+ "isExpression": false,
205
+ "asc": true,
206
+ "nulls": "last"
207
+ },
208
+ {
209
+ "expression": "visibility",
210
+ "isExpression": false,
211
+ "asc": true,
212
+ "nulls": "last"
213
+ },
214
+ {
215
+ "expression": "created_at",
216
+ "isExpression": false,
217
+ "asc": true,
218
+ "nulls": "last"
219
+ }
220
+ ],
221
+ "isUnique": false,
222
+ "concurrently": false,
223
+ "method": "btree",
224
+ "with": {}
225
+ }
226
+ },
227
+ "foreignKeys": {},
228
+ "compositePrimaryKeys": {},
229
+ "uniqueConstraints": {
230
+ "matches_join_code_unique": {
231
+ "name": "matches_join_code_unique",
232
+ "nullsNotDistinct": false,
233
+ "columns": [
234
+ "join_code"
235
+ ]
236
+ }
237
+ },
238
+ "policies": {},
239
+ "checkConstraints": {},
240
+ "isRLSEnabled": false
241
+ },
242
+ "public.players": {
243
+ "name": "players",
244
+ "schema": "",
245
+ "columns": {
246
+ "id": {
247
+ "name": "id",
248
+ "type": "text",
249
+ "primaryKey": true,
250
+ "notNull": true
251
+ },
252
+ "match_id": {
253
+ "name": "match_id",
254
+ "type": "text",
255
+ "primaryKey": false,
256
+ "notNull": true
257
+ },
258
+ "slot": {
259
+ "name": "slot",
260
+ "type": "integer",
261
+ "primaryKey": false,
262
+ "notNull": true,
263
+ "default": -1
264
+ },
265
+ "join_order": {
266
+ "name": "join_order",
267
+ "type": "integer",
268
+ "primaryKey": false,
269
+ "notNull": true,
270
+ "default": 0
271
+ },
272
+ "display_name": {
273
+ "name": "display_name",
274
+ "type": "text",
275
+ "primaryKey": false,
276
+ "notNull": true
277
+ },
278
+ "token_hash": {
279
+ "name": "token_hash",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": false
283
+ },
284
+ "status": {
285
+ "name": "status",
286
+ "type": "text",
287
+ "primaryKey": false,
288
+ "notNull": true
289
+ },
290
+ "joined_at": {
291
+ "name": "joined_at",
292
+ "type": "timestamp with time zone",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ }
296
+ },
297
+ "indexes": {
298
+ "players_match_idx": {
299
+ "name": "players_match_idx",
300
+ "columns": [
301
+ {
302
+ "expression": "match_id",
303
+ "isExpression": false,
304
+ "asc": true,
305
+ "nulls": "last"
306
+ }
307
+ ],
308
+ "isUnique": false,
309
+ "concurrently": false,
310
+ "method": "btree",
311
+ "with": {}
312
+ }
313
+ },
314
+ "foreignKeys": {
315
+ "players_match_id_matches_id_fk": {
316
+ "name": "players_match_id_matches_id_fk",
317
+ "tableFrom": "players",
318
+ "tableTo": "matches",
319
+ "columnsFrom": [
320
+ "match_id"
321
+ ],
322
+ "columnsTo": [
323
+ "id"
324
+ ],
325
+ "onDelete": "cascade",
326
+ "onUpdate": "no action"
327
+ }
328
+ },
329
+ "compositePrimaryKeys": {},
330
+ "uniqueConstraints": {
331
+ "players_token_hash_unique": {
332
+ "name": "players_token_hash_unique",
333
+ "nullsNotDistinct": false,
334
+ "columns": [
335
+ "token_hash"
336
+ ]
337
+ }
338
+ },
339
+ "policies": {},
340
+ "checkConstraints": {},
341
+ "isRLSEnabled": false
342
+ },
343
+ "public.snapshots": {
344
+ "name": "snapshots",
345
+ "schema": "",
346
+ "columns": {
347
+ "match_id": {
348
+ "name": "match_id",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": true
352
+ },
353
+ "turn": {
354
+ "name": "turn",
355
+ "type": "integer",
356
+ "primaryKey": false,
357
+ "notNull": true
358
+ },
359
+ "format_version": {
360
+ "name": "format_version",
361
+ "type": "integer",
362
+ "primaryKey": false,
363
+ "notNull": true
364
+ },
365
+ "protocol_version": {
366
+ "name": "protocol_version",
367
+ "type": "integer",
368
+ "primaryKey": false,
369
+ "notNull": true,
370
+ "default": 1
371
+ },
372
+ "state_hash": {
373
+ "name": "state_hash",
374
+ "type": "text",
375
+ "primaryKey": false,
376
+ "notNull": true
377
+ },
378
+ "uploaded_by_player_id": {
379
+ "name": "uploaded_by_player_id",
380
+ "type": "text",
381
+ "primaryKey": false,
382
+ "notNull": true
383
+ },
384
+ "uploaded_at": {
385
+ "name": "uploaded_at",
386
+ "type": "timestamp with time zone",
387
+ "primaryKey": false,
388
+ "notNull": true
389
+ },
390
+ "body": {
391
+ "name": "body",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": true
395
+ }
396
+ },
397
+ "indexes": {},
398
+ "foreignKeys": {
399
+ "snapshots_match_id_matches_id_fk": {
400
+ "name": "snapshots_match_id_matches_id_fk",
401
+ "tableFrom": "snapshots",
402
+ "tableTo": "matches",
403
+ "columnsFrom": [
404
+ "match_id"
405
+ ],
406
+ "columnsTo": [
407
+ "id"
408
+ ],
409
+ "onDelete": "cascade",
410
+ "onUpdate": "no action"
411
+ }
412
+ },
413
+ "compositePrimaryKeys": {
414
+ "snapshots_match_id_turn_pk": {
415
+ "name": "snapshots_match_id_turn_pk",
416
+ "columns": [
417
+ "match_id",
418
+ "turn"
419
+ ]
420
+ }
421
+ },
422
+ "uniqueConstraints": {},
423
+ "policies": {},
424
+ "checkConstraints": {},
425
+ "isRLSEnabled": false
426
+ },
427
+ "public.turn_orders": {
428
+ "name": "turn_orders",
429
+ "schema": "",
430
+ "columns": {
431
+ "match_id": {
432
+ "name": "match_id",
433
+ "type": "text",
434
+ "primaryKey": false,
435
+ "notNull": true
436
+ },
437
+ "turn": {
438
+ "name": "turn",
439
+ "type": "integer",
440
+ "primaryKey": false,
441
+ "notNull": true
442
+ },
443
+ "player_id": {
444
+ "name": "player_id",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": true
448
+ },
449
+ "orders": {
450
+ "name": "orders",
451
+ "type": "jsonb",
452
+ "primaryKey": false,
453
+ "notNull": false
454
+ },
455
+ "orders_hash": {
456
+ "name": "orders_hash",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": false
460
+ },
461
+ "ready": {
462
+ "name": "ready",
463
+ "type": "boolean",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "default": false
467
+ },
468
+ "submitted_at": {
469
+ "name": "submitted_at",
470
+ "type": "timestamp with time zone",
471
+ "primaryKey": false,
472
+ "notNull": false
473
+ }
474
+ },
475
+ "indexes": {},
476
+ "foreignKeys": {
477
+ "turn_orders_match_id_matches_id_fk": {
478
+ "name": "turn_orders_match_id_matches_id_fk",
479
+ "tableFrom": "turn_orders",
480
+ "tableTo": "matches",
481
+ "columnsFrom": [
482
+ "match_id"
483
+ ],
484
+ "columnsTo": [
485
+ "id"
486
+ ],
487
+ "onDelete": "cascade",
488
+ "onUpdate": "no action"
489
+ }
490
+ },
491
+ "compositePrimaryKeys": {
492
+ "turn_orders_match_id_turn_player_id_pk": {
493
+ "name": "turn_orders_match_id_turn_player_id_pk",
494
+ "columns": [
495
+ "match_id",
496
+ "turn",
497
+ "player_id"
498
+ ]
499
+ }
500
+ },
501
+ "uniqueConstraints": {},
502
+ "policies": {},
503
+ "checkConstraints": {},
504
+ "isRLSEnabled": false
505
+ },
506
+ "public.turn_reports": {
507
+ "name": "turn_reports",
508
+ "schema": "",
509
+ "columns": {
510
+ "match_id": {
511
+ "name": "match_id",
512
+ "type": "text",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "turn": {
517
+ "name": "turn",
518
+ "type": "integer",
519
+ "primaryKey": false,
520
+ "notNull": true
521
+ },
522
+ "player_id": {
523
+ "name": "player_id",
524
+ "type": "text",
525
+ "primaryKey": false,
526
+ "notNull": true
527
+ },
528
+ "state_hash": {
529
+ "name": "state_hash",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": true
533
+ },
534
+ "finished": {
535
+ "name": "finished",
536
+ "type": "boolean",
537
+ "primaryKey": false,
538
+ "notNull": true,
539
+ "default": false
540
+ },
541
+ "reported_at": {
542
+ "name": "reported_at",
543
+ "type": "timestamp with time zone",
544
+ "primaryKey": false,
545
+ "notNull": true
546
+ }
547
+ },
548
+ "indexes": {},
549
+ "foreignKeys": {
550
+ "turn_reports_match_id_matches_id_fk": {
551
+ "name": "turn_reports_match_id_matches_id_fk",
552
+ "tableFrom": "turn_reports",
553
+ "tableTo": "matches",
554
+ "columnsFrom": [
555
+ "match_id"
556
+ ],
557
+ "columnsTo": [
558
+ "id"
559
+ ],
560
+ "onDelete": "cascade",
561
+ "onUpdate": "no action"
562
+ }
563
+ },
564
+ "compositePrimaryKeys": {
565
+ "turn_reports_match_id_turn_player_id_pk": {
566
+ "name": "turn_reports_match_id_turn_player_id_pk",
567
+ "columns": [
568
+ "match_id",
569
+ "turn",
570
+ "player_id"
571
+ ]
572
+ }
573
+ },
574
+ "uniqueConstraints": {},
575
+ "policies": {},
576
+ "checkConstraints": {},
577
+ "isRLSEnabled": false
578
+ },
579
+ "public.turns": {
580
+ "name": "turns",
581
+ "schema": "",
582
+ "columns": {
583
+ "match_id": {
584
+ "name": "match_id",
585
+ "type": "text",
586
+ "primaryKey": false,
587
+ "notNull": true
588
+ },
589
+ "number": {
590
+ "name": "number",
591
+ "type": "integer",
592
+ "primaryKey": false,
593
+ "notNull": true
594
+ },
595
+ "status": {
596
+ "name": "status",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": true
600
+ },
601
+ "opened_at": {
602
+ "name": "opened_at",
603
+ "type": "timestamp with time zone",
604
+ "primaryKey": false,
605
+ "notNull": true
606
+ },
607
+ "deadline_at": {
608
+ "name": "deadline_at",
609
+ "type": "timestamp with time zone",
610
+ "primaryKey": false,
611
+ "notNull": false
612
+ },
613
+ "sealed_at": {
614
+ "name": "sealed_at",
615
+ "type": "timestamp with time zone",
616
+ "primaryKey": false,
617
+ "notNull": false
618
+ },
619
+ "order_set_hash": {
620
+ "name": "order_set_hash",
621
+ "type": "text",
622
+ "primaryKey": false,
623
+ "notNull": false
624
+ },
625
+ "sealed_slots": {
626
+ "name": "sealed_slots",
627
+ "type": "jsonb",
628
+ "primaryKey": false,
629
+ "notNull": false
630
+ },
631
+ "state_hash": {
632
+ "name": "state_hash",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": false
636
+ }
637
+ },
638
+ "indexes": {
639
+ "turns_deadline_idx": {
640
+ "name": "turns_deadline_idx",
641
+ "columns": [
642
+ {
643
+ "expression": "status",
644
+ "isExpression": false,
645
+ "asc": true,
646
+ "nulls": "last"
647
+ },
648
+ {
649
+ "expression": "deadline_at",
650
+ "isExpression": false,
651
+ "asc": true,
652
+ "nulls": "last"
653
+ }
654
+ ],
655
+ "isUnique": false,
656
+ "concurrently": false,
657
+ "method": "btree",
658
+ "with": {}
659
+ }
660
+ },
661
+ "foreignKeys": {
662
+ "turns_match_id_matches_id_fk": {
663
+ "name": "turns_match_id_matches_id_fk",
664
+ "tableFrom": "turns",
665
+ "tableTo": "matches",
666
+ "columnsFrom": [
667
+ "match_id"
668
+ ],
669
+ "columnsTo": [
670
+ "id"
671
+ ],
672
+ "onDelete": "cascade",
673
+ "onUpdate": "no action"
674
+ }
675
+ },
676
+ "compositePrimaryKeys": {
677
+ "turns_match_id_number_pk": {
678
+ "name": "turns_match_id_number_pk",
679
+ "columns": [
680
+ "match_id",
681
+ "number"
682
+ ]
683
+ }
684
+ },
685
+ "uniqueConstraints": {},
686
+ "policies": {},
687
+ "checkConstraints": {},
688
+ "isRLSEnabled": false
689
+ }
690
+ },
691
+ "enums": {},
692
+ "schemas": {},
693
+ "sequences": {},
694
+ "roles": {},
695
+ "policies": {},
696
+ "views": {},
697
+ "_meta": {
698
+ "columns": {},
699
+ "schemas": {},
700
+ "tables": {}
701
+ }
702
+ }
@@ -15,6 +15,13 @@
15
15
  "when": 1789380380023,
16
16
  "tag": "0001_slow_gamora",
17
17
  "breakpoints": true
18
+ },
19
+ {
20
+ "idx": 2,
21
+ "version": "7",
22
+ "when": 1789756764133,
23
+ "tag": "0002_magical_cargill",
24
+ "breakpoints": true
18
25
  }
19
26
  ]
20
- }
27
+ }