@openora/core 0.4.1-canary.279 → 0.4.1-canary.280

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,2100 @@
1
+ {
2
+ "id": "84ce4d1a-6301-4ed2-8c28-7d693cda02fd",
3
+ "prevId": "e21a4cd9-e36e-46e1-81da-3e1c6d36e6c1",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.chat_message": {
8
+ "name": "chat_message",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "room_id": {
19
+ "name": "room_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": false
23
+ },
24
+ "user_id": {
25
+ "name": "user_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "username": {
31
+ "name": "username",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "content": {
37
+ "name": "content",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "type": {
43
+ "name": "type",
44
+ "type": "chat_message_type",
45
+ "typeSchema": "public",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "'user'"
49
+ },
50
+ "metadata": {
51
+ "name": "metadata",
52
+ "type": "jsonb",
53
+ "primaryKey": false,
54
+ "notNull": false
55
+ },
56
+ "attachment": {
57
+ "name": "attachment",
58
+ "type": "jsonb",
59
+ "primaryKey": false,
60
+ "notNull": false
61
+ },
62
+ "is_deleted": {
63
+ "name": "is_deleted",
64
+ "type": "boolean",
65
+ "primaryKey": false,
66
+ "notNull": true,
67
+ "default": false
68
+ },
69
+ "deleted_at": {
70
+ "name": "deleted_at",
71
+ "type": "timestamp with time zone",
72
+ "primaryKey": false,
73
+ "notNull": false
74
+ },
75
+ "created_at": {
76
+ "name": "created_at",
77
+ "type": "timestamp with time zone",
78
+ "primaryKey": false,
79
+ "notNull": true,
80
+ "default": "clock_timestamp()"
81
+ }
82
+ },
83
+ "indexes": {
84
+ "chat_msg_room_id_created_at_idx": {
85
+ "name": "chat_msg_room_id_created_at_idx",
86
+ "columns": [
87
+ {
88
+ "expression": "room_id",
89
+ "isExpression": false,
90
+ "asc": true,
91
+ "nulls": "last"
92
+ },
93
+ {
94
+ "expression": "created_at",
95
+ "isExpression": false,
96
+ "asc": true,
97
+ "nulls": "last"
98
+ }
99
+ ],
100
+ "isUnique": false,
101
+ "concurrently": false,
102
+ "method": "btree",
103
+ "with": {}
104
+ },
105
+ "chat_msg_created_at_idx": {
106
+ "name": "chat_msg_created_at_idx",
107
+ "columns": [
108
+ {
109
+ "expression": "created_at",
110
+ "isExpression": false,
111
+ "asc": true,
112
+ "nulls": "last"
113
+ }
114
+ ],
115
+ "isUnique": false,
116
+ "concurrently": false,
117
+ "method": "btree",
118
+ "with": {}
119
+ },
120
+ "chat_msg_deleted_at_idx": {
121
+ "name": "chat_msg_deleted_at_idx",
122
+ "columns": [
123
+ {
124
+ "expression": "deleted_at",
125
+ "isExpression": false,
126
+ "asc": true,
127
+ "nulls": "last"
128
+ }
129
+ ],
130
+ "isUnique": false,
131
+ "concurrently": false,
132
+ "method": "btree",
133
+ "with": {}
134
+ },
135
+ "chat_msg_user_id_created_at_idx": {
136
+ "name": "chat_msg_user_id_created_at_idx",
137
+ "columns": [
138
+ {
139
+ "expression": "user_id",
140
+ "isExpression": false,
141
+ "asc": true,
142
+ "nulls": "last"
143
+ },
144
+ {
145
+ "expression": "created_at",
146
+ "isExpression": false,
147
+ "asc": true,
148
+ "nulls": "last"
149
+ }
150
+ ],
151
+ "isUnique": false,
152
+ "concurrently": false,
153
+ "method": "btree",
154
+ "with": {}
155
+ }
156
+ },
157
+ "foreignKeys": {
158
+ "chat_message_room_id_chat_room_id_fk": {
159
+ "name": "chat_message_room_id_chat_room_id_fk",
160
+ "tableFrom": "chat_message",
161
+ "tableTo": "chat_room",
162
+ "columnsFrom": ["room_id"],
163
+ "columnsTo": ["id"],
164
+ "onDelete": "cascade",
165
+ "onUpdate": "no action"
166
+ }
167
+ },
168
+ "compositePrimaryKeys": {},
169
+ "uniqueConstraints": {},
170
+ "policies": {},
171
+ "checkConstraints": {},
172
+ "isRLSEnabled": false
173
+ },
174
+ "public.chat_mute": {
175
+ "name": "chat_mute",
176
+ "schema": "",
177
+ "columns": {
178
+ "id": {
179
+ "name": "id",
180
+ "type": "uuid",
181
+ "primaryKey": true,
182
+ "notNull": true,
183
+ "default": "gen_random_uuid()"
184
+ },
185
+ "user_id": {
186
+ "name": "user_id",
187
+ "type": "uuid",
188
+ "primaryKey": false,
189
+ "notNull": true
190
+ },
191
+ "room_id": {
192
+ "name": "room_id",
193
+ "type": "uuid",
194
+ "primaryKey": false,
195
+ "notNull": false
196
+ },
197
+ "scope": {
198
+ "name": "scope",
199
+ "type": "chat_moderation_scope",
200
+ "typeSchema": "public",
201
+ "primaryKey": false,
202
+ "notNull": true,
203
+ "default": "'__global'"
204
+ },
205
+ "muted_by": {
206
+ "name": "muted_by",
207
+ "type": "uuid",
208
+ "primaryKey": false,
209
+ "notNull": true
210
+ },
211
+ "reason": {
212
+ "name": "reason",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": true
216
+ },
217
+ "created_at": {
218
+ "name": "created_at",
219
+ "type": "timestamp with time zone",
220
+ "primaryKey": false,
221
+ "notNull": true,
222
+ "default": "now()"
223
+ },
224
+ "expires_at": {
225
+ "name": "expires_at",
226
+ "type": "timestamp with time zone",
227
+ "primaryKey": false,
228
+ "notNull": false
229
+ },
230
+ "lifted_at": {
231
+ "name": "lifted_at",
232
+ "type": "timestamp with time zone",
233
+ "primaryKey": false,
234
+ "notNull": false
235
+ },
236
+ "lifted_by": {
237
+ "name": "lifted_by",
238
+ "type": "uuid",
239
+ "primaryKey": false,
240
+ "notNull": false
241
+ },
242
+ "expiry_recorded_at": {
243
+ "name": "expiry_recorded_at",
244
+ "type": "timestamp with time zone",
245
+ "primaryKey": false,
246
+ "notNull": false
247
+ }
248
+ },
249
+ "indexes": {
250
+ "chat_mute_active_scope_key": {
251
+ "name": "chat_mute_active_scope_key",
252
+ "columns": [
253
+ {
254
+ "expression": "user_id",
255
+ "isExpression": false,
256
+ "asc": true,
257
+ "nulls": "last"
258
+ },
259
+ {
260
+ "expression": "scope",
261
+ "isExpression": false,
262
+ "asc": true,
263
+ "nulls": "last"
264
+ }
265
+ ],
266
+ "isUnique": true,
267
+ "where": "\"chat_mute\".\"lifted_at\" IS NULL AND \"chat_mute\".\"room_id\" IS NULL",
268
+ "concurrently": false,
269
+ "method": "btree",
270
+ "with": {}
271
+ },
272
+ "chat_mute_active_room_key": {
273
+ "name": "chat_mute_active_room_key",
274
+ "columns": [
275
+ {
276
+ "expression": "user_id",
277
+ "isExpression": false,
278
+ "asc": true,
279
+ "nulls": "last"
280
+ },
281
+ {
282
+ "expression": "scope",
283
+ "isExpression": false,
284
+ "asc": true,
285
+ "nulls": "last"
286
+ },
287
+ {
288
+ "expression": "room_id",
289
+ "isExpression": false,
290
+ "asc": true,
291
+ "nulls": "last"
292
+ }
293
+ ],
294
+ "isUnique": true,
295
+ "where": "\"chat_mute\".\"lifted_at\" IS NULL AND \"chat_mute\".\"room_id\" IS NOT NULL",
296
+ "concurrently": false,
297
+ "method": "btree",
298
+ "with": {}
299
+ },
300
+ "chat_mute_user_room_idx": {
301
+ "name": "chat_mute_user_room_idx",
302
+ "columns": [
303
+ {
304
+ "expression": "user_id",
305
+ "isExpression": false,
306
+ "asc": true,
307
+ "nulls": "last"
308
+ },
309
+ {
310
+ "expression": "room_id",
311
+ "isExpression": false,
312
+ "asc": true,
313
+ "nulls": "last"
314
+ }
315
+ ],
316
+ "isUnique": false,
317
+ "concurrently": false,
318
+ "method": "btree",
319
+ "with": {}
320
+ },
321
+ "chat_mute_expires_at_idx": {
322
+ "name": "chat_mute_expires_at_idx",
323
+ "columns": [
324
+ {
325
+ "expression": "expires_at",
326
+ "isExpression": false,
327
+ "asc": true,
328
+ "nulls": "last"
329
+ }
330
+ ],
331
+ "isUnique": false,
332
+ "concurrently": false,
333
+ "method": "btree",
334
+ "with": {}
335
+ },
336
+ "chat_mute_active_room_idx": {
337
+ "name": "chat_mute_active_room_idx",
338
+ "columns": [
339
+ {
340
+ "expression": "room_id",
341
+ "isExpression": false,
342
+ "asc": true,
343
+ "nulls": "last"
344
+ },
345
+ {
346
+ "expression": "expires_at",
347
+ "isExpression": false,
348
+ "asc": true,
349
+ "nulls": "last"
350
+ }
351
+ ],
352
+ "isUnique": false,
353
+ "where": "\"chat_mute\".\"lifted_at\" IS NULL",
354
+ "concurrently": false,
355
+ "method": "btree",
356
+ "with": {}
357
+ },
358
+ "chat_mute_active_scope_idx": {
359
+ "name": "chat_mute_active_scope_idx",
360
+ "columns": [
361
+ {
362
+ "expression": "scope",
363
+ "isExpression": false,
364
+ "asc": true,
365
+ "nulls": "last"
366
+ },
367
+ {
368
+ "expression": "expires_at",
369
+ "isExpression": false,
370
+ "asc": true,
371
+ "nulls": "last"
372
+ }
373
+ ],
374
+ "isUnique": false,
375
+ "where": "\"chat_mute\".\"lifted_at\" IS NULL",
376
+ "concurrently": false,
377
+ "method": "btree",
378
+ "with": {}
379
+ }
380
+ },
381
+ "foreignKeys": {},
382
+ "compositePrimaryKeys": {},
383
+ "uniqueConstraints": {},
384
+ "policies": {},
385
+ "checkConstraints": {},
386
+ "isRLSEnabled": false
387
+ },
388
+ "public.chat_platform_ban": {
389
+ "name": "chat_platform_ban",
390
+ "schema": "",
391
+ "columns": {
392
+ "id": {
393
+ "name": "id",
394
+ "type": "uuid",
395
+ "primaryKey": true,
396
+ "notNull": true,
397
+ "default": "gen_random_uuid()"
398
+ },
399
+ "user_id": {
400
+ "name": "user_id",
401
+ "type": "uuid",
402
+ "primaryKey": false,
403
+ "notNull": true
404
+ },
405
+ "banned_by": {
406
+ "name": "banned_by",
407
+ "type": "uuid",
408
+ "primaryKey": false,
409
+ "notNull": true
410
+ },
411
+ "scope": {
412
+ "name": "scope",
413
+ "type": "chat_moderation_scope",
414
+ "typeSchema": "public",
415
+ "primaryKey": false,
416
+ "notNull": true,
417
+ "default": "'__all_public'"
418
+ },
419
+ "room_id": {
420
+ "name": "room_id",
421
+ "type": "uuid",
422
+ "primaryKey": false,
423
+ "notNull": false
424
+ },
425
+ "reason": {
426
+ "name": "reason",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": true
430
+ },
431
+ "created_at": {
432
+ "name": "created_at",
433
+ "type": "timestamp with time zone",
434
+ "primaryKey": false,
435
+ "notNull": true,
436
+ "default": "now()"
437
+ },
438
+ "expires_at": {
439
+ "name": "expires_at",
440
+ "type": "timestamp with time zone",
441
+ "primaryKey": false,
442
+ "notNull": false
443
+ },
444
+ "lifted_at": {
445
+ "name": "lifted_at",
446
+ "type": "timestamp with time zone",
447
+ "primaryKey": false,
448
+ "notNull": false
449
+ },
450
+ "lifted_by": {
451
+ "name": "lifted_by",
452
+ "type": "uuid",
453
+ "primaryKey": false,
454
+ "notNull": false
455
+ },
456
+ "expiry_recorded_at": {
457
+ "name": "expiry_recorded_at",
458
+ "type": "timestamp with time zone",
459
+ "primaryKey": false,
460
+ "notNull": false
461
+ }
462
+ },
463
+ "indexes": {
464
+ "chat_platform_ban_active_scope_key": {
465
+ "name": "chat_platform_ban_active_scope_key",
466
+ "columns": [
467
+ {
468
+ "expression": "user_id",
469
+ "isExpression": false,
470
+ "asc": true,
471
+ "nulls": "last"
472
+ },
473
+ {
474
+ "expression": "scope",
475
+ "isExpression": false,
476
+ "asc": true,
477
+ "nulls": "last"
478
+ }
479
+ ],
480
+ "isUnique": true,
481
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL AND \"chat_platform_ban\".\"room_id\" IS NULL",
482
+ "concurrently": false,
483
+ "method": "btree",
484
+ "with": {}
485
+ },
486
+ "chat_platform_ban_active_room_key": {
487
+ "name": "chat_platform_ban_active_room_key",
488
+ "columns": [
489
+ {
490
+ "expression": "user_id",
491
+ "isExpression": false,
492
+ "asc": true,
493
+ "nulls": "last"
494
+ },
495
+ {
496
+ "expression": "scope",
497
+ "isExpression": false,
498
+ "asc": true,
499
+ "nulls": "last"
500
+ },
501
+ {
502
+ "expression": "room_id",
503
+ "isExpression": false,
504
+ "asc": true,
505
+ "nulls": "last"
506
+ }
507
+ ],
508
+ "isUnique": true,
509
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL AND \"chat_platform_ban\".\"room_id\" IS NOT NULL",
510
+ "concurrently": false,
511
+ "method": "btree",
512
+ "with": {}
513
+ },
514
+ "chat_platform_ban_user_idx": {
515
+ "name": "chat_platform_ban_user_idx",
516
+ "columns": [
517
+ {
518
+ "expression": "user_id",
519
+ "isExpression": false,
520
+ "asc": true,
521
+ "nulls": "last"
522
+ }
523
+ ],
524
+ "isUnique": false,
525
+ "concurrently": false,
526
+ "method": "btree",
527
+ "with": {}
528
+ },
529
+ "chat_platform_ban_expires_at_idx": {
530
+ "name": "chat_platform_ban_expires_at_idx",
531
+ "columns": [
532
+ {
533
+ "expression": "expires_at",
534
+ "isExpression": false,
535
+ "asc": true,
536
+ "nulls": "last"
537
+ }
538
+ ],
539
+ "isUnique": false,
540
+ "concurrently": false,
541
+ "method": "btree",
542
+ "with": {}
543
+ },
544
+ "chat_platform_ban_active_room_idx": {
545
+ "name": "chat_platform_ban_active_room_idx",
546
+ "columns": [
547
+ {
548
+ "expression": "room_id",
549
+ "isExpression": false,
550
+ "asc": true,
551
+ "nulls": "last"
552
+ },
553
+ {
554
+ "expression": "expires_at",
555
+ "isExpression": false,
556
+ "asc": true,
557
+ "nulls": "last"
558
+ }
559
+ ],
560
+ "isUnique": false,
561
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL",
562
+ "concurrently": false,
563
+ "method": "btree",
564
+ "with": {}
565
+ },
566
+ "chat_platform_ban_active_scope_idx": {
567
+ "name": "chat_platform_ban_active_scope_idx",
568
+ "columns": [
569
+ {
570
+ "expression": "scope",
571
+ "isExpression": false,
572
+ "asc": true,
573
+ "nulls": "last"
574
+ },
575
+ {
576
+ "expression": "expires_at",
577
+ "isExpression": false,
578
+ "asc": true,
579
+ "nulls": "last"
580
+ }
581
+ ],
582
+ "isUnique": false,
583
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL",
584
+ "concurrently": false,
585
+ "method": "btree",
586
+ "with": {}
587
+ }
588
+ },
589
+ "foreignKeys": {
590
+ "chat_platform_ban_room_id_chat_room_id_fk": {
591
+ "name": "chat_platform_ban_room_id_chat_room_id_fk",
592
+ "tableFrom": "chat_platform_ban",
593
+ "tableTo": "chat_room",
594
+ "columnsFrom": ["room_id"],
595
+ "columnsTo": ["id"],
596
+ "onDelete": "cascade",
597
+ "onUpdate": "no action"
598
+ }
599
+ },
600
+ "compositePrimaryKeys": {},
601
+ "uniqueConstraints": {},
602
+ "policies": {},
603
+ "checkConstraints": {},
604
+ "isRLSEnabled": false
605
+ },
606
+ "public.chat_player_cooldown": {
607
+ "name": "chat_player_cooldown",
608
+ "schema": "",
609
+ "columns": {
610
+ "id": {
611
+ "name": "id",
612
+ "type": "uuid",
613
+ "primaryKey": true,
614
+ "notNull": true,
615
+ "default": "gen_random_uuid()"
616
+ },
617
+ "user_id": {
618
+ "name": "user_id",
619
+ "type": "uuid",
620
+ "primaryKey": false,
621
+ "notNull": true
622
+ },
623
+ "room_id": {
624
+ "name": "room_id",
625
+ "type": "uuid",
626
+ "primaryKey": false,
627
+ "notNull": false
628
+ },
629
+ "scope": {
630
+ "name": "scope",
631
+ "type": "chat_moderation_scope",
632
+ "typeSchema": "public",
633
+ "primaryKey": false,
634
+ "notNull": true
635
+ },
636
+ "cooldown_seconds": {
637
+ "name": "cooldown_seconds",
638
+ "type": "integer",
639
+ "primaryKey": false,
640
+ "notNull": true
641
+ },
642
+ "reason": {
643
+ "name": "reason",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": true
647
+ },
648
+ "created_by": {
649
+ "name": "created_by",
650
+ "type": "uuid",
651
+ "primaryKey": false,
652
+ "notNull": true
653
+ },
654
+ "created_at": {
655
+ "name": "created_at",
656
+ "type": "timestamp with time zone",
657
+ "primaryKey": false,
658
+ "notNull": true,
659
+ "default": "now()"
660
+ },
661
+ "expires_at": {
662
+ "name": "expires_at",
663
+ "type": "timestamp with time zone",
664
+ "primaryKey": false,
665
+ "notNull": false
666
+ },
667
+ "lifted_at": {
668
+ "name": "lifted_at",
669
+ "type": "timestamp with time zone",
670
+ "primaryKey": false,
671
+ "notNull": false
672
+ },
673
+ "lifted_by": {
674
+ "name": "lifted_by",
675
+ "type": "uuid",
676
+ "primaryKey": false,
677
+ "notNull": false
678
+ },
679
+ "expiry_recorded_at": {
680
+ "name": "expiry_recorded_at",
681
+ "type": "timestamp with time zone",
682
+ "primaryKey": false,
683
+ "notNull": false
684
+ }
685
+ },
686
+ "indexes": {
687
+ "chat_player_cooldown_active_scope_key": {
688
+ "name": "chat_player_cooldown_active_scope_key",
689
+ "columns": [
690
+ {
691
+ "expression": "user_id",
692
+ "isExpression": false,
693
+ "asc": true,
694
+ "nulls": "last"
695
+ },
696
+ {
697
+ "expression": "scope",
698
+ "isExpression": false,
699
+ "asc": true,
700
+ "nulls": "last"
701
+ }
702
+ ],
703
+ "isUnique": true,
704
+ "where": "\"chat_player_cooldown\".\"lifted_at\" IS NULL AND \"chat_player_cooldown\".\"room_id\" IS NULL",
705
+ "concurrently": false,
706
+ "method": "btree",
707
+ "with": {}
708
+ },
709
+ "chat_player_cooldown_active_room_key": {
710
+ "name": "chat_player_cooldown_active_room_key",
711
+ "columns": [
712
+ {
713
+ "expression": "user_id",
714
+ "isExpression": false,
715
+ "asc": true,
716
+ "nulls": "last"
717
+ },
718
+ {
719
+ "expression": "scope",
720
+ "isExpression": false,
721
+ "asc": true,
722
+ "nulls": "last"
723
+ },
724
+ {
725
+ "expression": "room_id",
726
+ "isExpression": false,
727
+ "asc": true,
728
+ "nulls": "last"
729
+ }
730
+ ],
731
+ "isUnique": true,
732
+ "where": "\"chat_player_cooldown\".\"lifted_at\" IS NULL AND \"chat_player_cooldown\".\"room_id\" IS NOT NULL",
733
+ "concurrently": false,
734
+ "method": "btree",
735
+ "with": {}
736
+ },
737
+ "chat_player_cooldown_user_idx": {
738
+ "name": "chat_player_cooldown_user_idx",
739
+ "columns": [
740
+ {
741
+ "expression": "user_id",
742
+ "isExpression": false,
743
+ "asc": true,
744
+ "nulls": "last"
745
+ }
746
+ ],
747
+ "isUnique": false,
748
+ "concurrently": false,
749
+ "method": "btree",
750
+ "with": {}
751
+ },
752
+ "chat_player_cooldown_active_room_idx": {
753
+ "name": "chat_player_cooldown_active_room_idx",
754
+ "columns": [
755
+ {
756
+ "expression": "room_id",
757
+ "isExpression": false,
758
+ "asc": true,
759
+ "nulls": "last"
760
+ },
761
+ {
762
+ "expression": "expires_at",
763
+ "isExpression": false,
764
+ "asc": true,
765
+ "nulls": "last"
766
+ }
767
+ ],
768
+ "isUnique": false,
769
+ "where": "\"chat_player_cooldown\".\"lifted_at\" IS NULL",
770
+ "concurrently": false,
771
+ "method": "btree",
772
+ "with": {}
773
+ },
774
+ "chat_player_cooldown_active_scope_idx": {
775
+ "name": "chat_player_cooldown_active_scope_idx",
776
+ "columns": [
777
+ {
778
+ "expression": "scope",
779
+ "isExpression": false,
780
+ "asc": true,
781
+ "nulls": "last"
782
+ },
783
+ {
784
+ "expression": "expires_at",
785
+ "isExpression": false,
786
+ "asc": true,
787
+ "nulls": "last"
788
+ }
789
+ ],
790
+ "isUnique": false,
791
+ "where": "\"chat_player_cooldown\".\"lifted_at\" IS NULL",
792
+ "concurrently": false,
793
+ "method": "btree",
794
+ "with": {}
795
+ },
796
+ "chat_player_cooldown_expiry_due_idx": {
797
+ "name": "chat_player_cooldown_expiry_due_idx",
798
+ "columns": [
799
+ {
800
+ "expression": "expires_at",
801
+ "isExpression": false,
802
+ "asc": true,
803
+ "nulls": "last"
804
+ }
805
+ ],
806
+ "isUnique": false,
807
+ "where": "\"chat_player_cooldown\".\"expires_at\" IS NOT NULL AND \"chat_player_cooldown\".\"expiry_recorded_at\" IS NULL AND (\"chat_player_cooldown\".\"lifted_at\" IS NULL OR \"chat_player_cooldown\".\"lifted_at\" = \"chat_player_cooldown\".\"expires_at\")",
808
+ "concurrently": false,
809
+ "method": "btree",
810
+ "with": {}
811
+ }
812
+ },
813
+ "foreignKeys": {},
814
+ "compositePrimaryKeys": {},
815
+ "uniqueConstraints": {},
816
+ "policies": {},
817
+ "checkConstraints": {
818
+ "chat_player_cooldown_seconds_check": {
819
+ "name": "chat_player_cooldown_seconds_check",
820
+ "value": "\"chat_player_cooldown\".\"cooldown_seconds\" > 0 AND \"chat_player_cooldown\".\"cooldown_seconds\" <= 86400"
821
+ },
822
+ "chat_player_cooldown_room_scope_check": {
823
+ "name": "chat_player_cooldown_room_scope_check",
824
+ "value": "(\"chat_player_cooldown\".\"scope\" = 'room') = (\"chat_player_cooldown\".\"room_id\" IS NOT NULL)"
825
+ }
826
+ },
827
+ "isRLSEnabled": false
828
+ },
829
+ "public.chat_room": {
830
+ "name": "chat_room",
831
+ "schema": "",
832
+ "columns": {
833
+ "id": {
834
+ "name": "id",
835
+ "type": "uuid",
836
+ "primaryKey": true,
837
+ "notNull": true,
838
+ "default": "gen_random_uuid()"
839
+ },
840
+ "name": {
841
+ "name": "name",
842
+ "type": "text",
843
+ "primaryKey": false,
844
+ "notNull": true
845
+ },
846
+ "slug": {
847
+ "name": "slug",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": true
851
+ },
852
+ "category": {
853
+ "name": "category",
854
+ "type": "chat_room_category",
855
+ "typeSchema": "public",
856
+ "primaryKey": false,
857
+ "notNull": false
858
+ },
859
+ "is_public": {
860
+ "name": "is_public",
861
+ "type": "boolean",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "default": true
865
+ },
866
+ "join_code": {
867
+ "name": "join_code",
868
+ "type": "text",
869
+ "primaryKey": false,
870
+ "notNull": false
871
+ },
872
+ "creator_id": {
873
+ "name": "creator_id",
874
+ "type": "uuid",
875
+ "primaryKey": false,
876
+ "notNull": false
877
+ },
878
+ "created_at": {
879
+ "name": "created_at",
880
+ "type": "timestamp with time zone",
881
+ "primaryKey": false,
882
+ "notNull": true,
883
+ "default": "now()"
884
+ },
885
+ "deleted_at": {
886
+ "name": "deleted_at",
887
+ "type": "timestamp with time zone",
888
+ "primaryKey": false,
889
+ "notNull": false
890
+ },
891
+ "scheduled_deletion_at": {
892
+ "name": "scheduled_deletion_at",
893
+ "type": "timestamp with time zone",
894
+ "primaryKey": false,
895
+ "notNull": false
896
+ },
897
+ "kind": {
898
+ "name": "kind",
899
+ "type": "chat_room_kind",
900
+ "typeSchema": "public",
901
+ "primaryKey": false,
902
+ "notNull": true,
903
+ "default": "'standard'"
904
+ },
905
+ "context_ref": {
906
+ "name": "context_ref",
907
+ "type": "text",
908
+ "primaryKey": false,
909
+ "notNull": false
910
+ }
911
+ },
912
+ "indexes": {
913
+ "chat_room_slug_key": {
914
+ "name": "chat_room_slug_key",
915
+ "columns": [
916
+ {
917
+ "expression": "slug",
918
+ "isExpression": false,
919
+ "asc": true,
920
+ "nulls": "last"
921
+ }
922
+ ],
923
+ "isUnique": true,
924
+ "concurrently": false,
925
+ "method": "btree",
926
+ "with": {}
927
+ },
928
+ "chat_room_join_code_key": {
929
+ "name": "chat_room_join_code_key",
930
+ "columns": [
931
+ {
932
+ "expression": "join_code",
933
+ "isExpression": false,
934
+ "asc": true,
935
+ "nulls": "last"
936
+ }
937
+ ],
938
+ "isUnique": true,
939
+ "concurrently": false,
940
+ "method": "btree",
941
+ "with": {}
942
+ },
943
+ "chat_room_context_ref_key": {
944
+ "name": "chat_room_context_ref_key",
945
+ "columns": [
946
+ {
947
+ "expression": "context_ref",
948
+ "isExpression": false,
949
+ "asc": true,
950
+ "nulls": "last"
951
+ }
952
+ ],
953
+ "isUnique": true,
954
+ "concurrently": false,
955
+ "method": "btree",
956
+ "with": {}
957
+ },
958
+ "chat_room_deleted_at_idx": {
959
+ "name": "chat_room_deleted_at_idx",
960
+ "columns": [
961
+ {
962
+ "expression": "deleted_at",
963
+ "isExpression": false,
964
+ "asc": true,
965
+ "nulls": "last"
966
+ }
967
+ ],
968
+ "isUnique": false,
969
+ "concurrently": false,
970
+ "method": "btree",
971
+ "with": {}
972
+ },
973
+ "chat_room_creator_public_deleted_at_idx": {
974
+ "name": "chat_room_creator_public_deleted_at_idx",
975
+ "columns": [
976
+ {
977
+ "expression": "creator_id",
978
+ "isExpression": false,
979
+ "asc": true,
980
+ "nulls": "last"
981
+ },
982
+ {
983
+ "expression": "is_public",
984
+ "isExpression": false,
985
+ "asc": true,
986
+ "nulls": "last"
987
+ },
988
+ {
989
+ "expression": "deleted_at",
990
+ "isExpression": false,
991
+ "asc": true,
992
+ "nulls": "last"
993
+ }
994
+ ],
995
+ "isUnique": false,
996
+ "concurrently": false,
997
+ "method": "btree",
998
+ "with": {}
999
+ },
1000
+ "chat_room_scheduled_deletion_idx": {
1001
+ "name": "chat_room_scheduled_deletion_idx",
1002
+ "columns": [
1003
+ {
1004
+ "expression": "scheduled_deletion_at",
1005
+ "isExpression": false,
1006
+ "asc": true,
1007
+ "nulls": "last"
1008
+ }
1009
+ ],
1010
+ "isUnique": false,
1011
+ "where": "\"chat_room\".\"scheduled_deletion_at\" IS NOT NULL",
1012
+ "concurrently": false,
1013
+ "method": "btree",
1014
+ "with": {}
1015
+ }
1016
+ },
1017
+ "foreignKeys": {},
1018
+ "compositePrimaryKeys": {},
1019
+ "uniqueConstraints": {},
1020
+ "policies": {},
1021
+ "checkConstraints": {
1022
+ "chat_room_context_kind_check": {
1023
+ "name": "chat_room_context_kind_check",
1024
+ "value": "(\"chat_room\".\"kind\" = 'context') = (\"chat_room\".\"context_ref\" IS NOT NULL) AND (\"chat_room\".\"kind\" = 'standard' OR NOT \"chat_room\".\"is_public\")"
1025
+ }
1026
+ },
1027
+ "isRLSEnabled": false
1028
+ },
1029
+ "public.chat_room_ban": {
1030
+ "name": "chat_room_ban",
1031
+ "schema": "",
1032
+ "columns": {
1033
+ "id": {
1034
+ "name": "id",
1035
+ "type": "uuid",
1036
+ "primaryKey": true,
1037
+ "notNull": true,
1038
+ "default": "gen_random_uuid()"
1039
+ },
1040
+ "room_id": {
1041
+ "name": "room_id",
1042
+ "type": "uuid",
1043
+ "primaryKey": false,
1044
+ "notNull": true
1045
+ },
1046
+ "user_id": {
1047
+ "name": "user_id",
1048
+ "type": "uuid",
1049
+ "primaryKey": false,
1050
+ "notNull": true
1051
+ },
1052
+ "banned_by": {
1053
+ "name": "banned_by",
1054
+ "type": "uuid",
1055
+ "primaryKey": false,
1056
+ "notNull": true
1057
+ },
1058
+ "created_at": {
1059
+ "name": "created_at",
1060
+ "type": "timestamp with time zone",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "default": "now()"
1064
+ },
1065
+ "expires_at": {
1066
+ "name": "expires_at",
1067
+ "type": "timestamp with time zone",
1068
+ "primaryKey": false,
1069
+ "notNull": false
1070
+ },
1071
+ "lifted_at": {
1072
+ "name": "lifted_at",
1073
+ "type": "timestamp with time zone",
1074
+ "primaryKey": false,
1075
+ "notNull": false
1076
+ },
1077
+ "lifted_by": {
1078
+ "name": "lifted_by",
1079
+ "type": "uuid",
1080
+ "primaryKey": false,
1081
+ "notNull": false
1082
+ }
1083
+ },
1084
+ "indexes": {
1085
+ "chat_room_ban_active_room_user_key": {
1086
+ "name": "chat_room_ban_active_room_user_key",
1087
+ "columns": [
1088
+ {
1089
+ "expression": "room_id",
1090
+ "isExpression": false,
1091
+ "asc": true,
1092
+ "nulls": "last"
1093
+ },
1094
+ {
1095
+ "expression": "user_id",
1096
+ "isExpression": false,
1097
+ "asc": true,
1098
+ "nulls": "last"
1099
+ }
1100
+ ],
1101
+ "isUnique": true,
1102
+ "where": "\"chat_room_ban\".\"lifted_at\" IS NULL",
1103
+ "concurrently": false,
1104
+ "method": "btree",
1105
+ "with": {}
1106
+ },
1107
+ "chat_room_ban_room_idx": {
1108
+ "name": "chat_room_ban_room_idx",
1109
+ "columns": [
1110
+ {
1111
+ "expression": "room_id",
1112
+ "isExpression": false,
1113
+ "asc": true,
1114
+ "nulls": "last"
1115
+ }
1116
+ ],
1117
+ "isUnique": false,
1118
+ "concurrently": false,
1119
+ "method": "btree",
1120
+ "with": {}
1121
+ },
1122
+ "chat_room_ban_user_idx": {
1123
+ "name": "chat_room_ban_user_idx",
1124
+ "columns": [
1125
+ {
1126
+ "expression": "user_id",
1127
+ "isExpression": false,
1128
+ "asc": true,
1129
+ "nulls": "last"
1130
+ }
1131
+ ],
1132
+ "isUnique": false,
1133
+ "concurrently": false,
1134
+ "method": "btree",
1135
+ "with": {}
1136
+ },
1137
+ "chat_room_ban_expires_at_idx": {
1138
+ "name": "chat_room_ban_expires_at_idx",
1139
+ "columns": [
1140
+ {
1141
+ "expression": "expires_at",
1142
+ "isExpression": false,
1143
+ "asc": true,
1144
+ "nulls": "last"
1145
+ }
1146
+ ],
1147
+ "isUnique": false,
1148
+ "concurrently": false,
1149
+ "method": "btree",
1150
+ "with": {}
1151
+ }
1152
+ },
1153
+ "foreignKeys": {
1154
+ "chat_room_ban_room_id_chat_room_id_fk": {
1155
+ "name": "chat_room_ban_room_id_chat_room_id_fk",
1156
+ "tableFrom": "chat_room_ban",
1157
+ "tableTo": "chat_room",
1158
+ "columnsFrom": ["room_id"],
1159
+ "columnsTo": ["id"],
1160
+ "onDelete": "cascade",
1161
+ "onUpdate": "no action"
1162
+ }
1163
+ },
1164
+ "compositePrimaryKeys": {},
1165
+ "uniqueConstraints": {},
1166
+ "policies": {},
1167
+ "checkConstraints": {},
1168
+ "isRLSEnabled": false
1169
+ },
1170
+ "public.chat_room_configuration": {
1171
+ "name": "chat_room_configuration",
1172
+ "schema": "",
1173
+ "columns": {
1174
+ "id": {
1175
+ "name": "id",
1176
+ "type": "uuid",
1177
+ "primaryKey": true,
1178
+ "notNull": true,
1179
+ "default": "gen_random_uuid()"
1180
+ },
1181
+ "room_id": {
1182
+ "name": "room_id",
1183
+ "type": "uuid",
1184
+ "primaryKey": false,
1185
+ "notNull": true
1186
+ },
1187
+ "slow_mode": {
1188
+ "name": "slow_mode",
1189
+ "type": "boolean",
1190
+ "primaryKey": false,
1191
+ "notNull": true,
1192
+ "default": false
1193
+ },
1194
+ "slow_mode_seconds": {
1195
+ "name": "slow_mode_seconds",
1196
+ "type": "integer",
1197
+ "primaryKey": false,
1198
+ "notNull": true,
1199
+ "default": 0
1200
+ },
1201
+ "read_only_mode": {
1202
+ "name": "read_only_mode",
1203
+ "type": "boolean",
1204
+ "primaryKey": false,
1205
+ "notNull": true,
1206
+ "default": false
1207
+ },
1208
+ "only_invited_can_join": {
1209
+ "name": "only_invited_can_join",
1210
+ "type": "boolean",
1211
+ "primaryKey": false,
1212
+ "notNull": true,
1213
+ "default": false
1214
+ },
1215
+ "lock_room": {
1216
+ "name": "lock_room",
1217
+ "type": "boolean",
1218
+ "primaryKey": false,
1219
+ "notNull": true,
1220
+ "default": false
1221
+ },
1222
+ "moderator_invite": {
1223
+ "name": "moderator_invite",
1224
+ "type": "boolean",
1225
+ "primaryKey": false,
1226
+ "notNull": true,
1227
+ "default": false
1228
+ },
1229
+ "created_at": {
1230
+ "name": "created_at",
1231
+ "type": "timestamp with time zone",
1232
+ "primaryKey": false,
1233
+ "notNull": true,
1234
+ "default": "now()"
1235
+ },
1236
+ "updated_at": {
1237
+ "name": "updated_at",
1238
+ "type": "timestamp with time zone",
1239
+ "primaryKey": false,
1240
+ "notNull": true,
1241
+ "default": "now()"
1242
+ }
1243
+ },
1244
+ "indexes": {
1245
+ "chat_room_configuration_room_key": {
1246
+ "name": "chat_room_configuration_room_key",
1247
+ "columns": [
1248
+ {
1249
+ "expression": "room_id",
1250
+ "isExpression": false,
1251
+ "asc": true,
1252
+ "nulls": "last"
1253
+ }
1254
+ ],
1255
+ "isUnique": true,
1256
+ "concurrently": false,
1257
+ "method": "btree",
1258
+ "with": {}
1259
+ }
1260
+ },
1261
+ "foreignKeys": {
1262
+ "chat_room_configuration_room_id_chat_room_id_fk": {
1263
+ "name": "chat_room_configuration_room_id_chat_room_id_fk",
1264
+ "tableFrom": "chat_room_configuration",
1265
+ "tableTo": "chat_room",
1266
+ "columnsFrom": ["room_id"],
1267
+ "columnsTo": ["id"],
1268
+ "onDelete": "cascade",
1269
+ "onUpdate": "no action"
1270
+ }
1271
+ },
1272
+ "compositePrimaryKeys": {},
1273
+ "uniqueConstraints": {},
1274
+ "policies": {},
1275
+ "checkConstraints": {},
1276
+ "isRLSEnabled": false
1277
+ },
1278
+ "public.chat_room_invite": {
1279
+ "name": "chat_room_invite",
1280
+ "schema": "",
1281
+ "columns": {
1282
+ "id": {
1283
+ "name": "id",
1284
+ "type": "uuid",
1285
+ "primaryKey": true,
1286
+ "notNull": true,
1287
+ "default": "gen_random_uuid()"
1288
+ },
1289
+ "room_id": {
1290
+ "name": "room_id",
1291
+ "type": "uuid",
1292
+ "primaryKey": false,
1293
+ "notNull": true
1294
+ },
1295
+ "inviter_id": {
1296
+ "name": "inviter_id",
1297
+ "type": "uuid",
1298
+ "primaryKey": false,
1299
+ "notNull": true
1300
+ },
1301
+ "invitee_id": {
1302
+ "name": "invitee_id",
1303
+ "type": "uuid",
1304
+ "primaryKey": false,
1305
+ "notNull": true
1306
+ },
1307
+ "status": {
1308
+ "name": "status",
1309
+ "type": "chat_room_invite_status",
1310
+ "typeSchema": "public",
1311
+ "primaryKey": false,
1312
+ "notNull": true,
1313
+ "default": "'pending'"
1314
+ },
1315
+ "withheld": {
1316
+ "name": "withheld",
1317
+ "type": "boolean",
1318
+ "primaryKey": false,
1319
+ "notNull": true,
1320
+ "default": false
1321
+ },
1322
+ "created_at": {
1323
+ "name": "created_at",
1324
+ "type": "timestamp with time zone",
1325
+ "primaryKey": false,
1326
+ "notNull": true,
1327
+ "default": "now()"
1328
+ },
1329
+ "responded_at": {
1330
+ "name": "responded_at",
1331
+ "type": "timestamp with time zone",
1332
+ "primaryKey": false,
1333
+ "notNull": false
1334
+ }
1335
+ },
1336
+ "indexes": {
1337
+ "chat_room_invite_pending_room_invitee_key": {
1338
+ "name": "chat_room_invite_pending_room_invitee_key",
1339
+ "columns": [
1340
+ {
1341
+ "expression": "room_id",
1342
+ "isExpression": false,
1343
+ "asc": true,
1344
+ "nulls": "last"
1345
+ },
1346
+ {
1347
+ "expression": "invitee_id",
1348
+ "isExpression": false,
1349
+ "asc": true,
1350
+ "nulls": "last"
1351
+ }
1352
+ ],
1353
+ "isUnique": true,
1354
+ "where": "\"chat_room_invite\".\"status\" = 'pending'",
1355
+ "concurrently": false,
1356
+ "method": "btree",
1357
+ "with": {}
1358
+ },
1359
+ "chat_room_invite_invitee_status_idx": {
1360
+ "name": "chat_room_invite_invitee_status_idx",
1361
+ "columns": [
1362
+ {
1363
+ "expression": "invitee_id",
1364
+ "isExpression": false,
1365
+ "asc": true,
1366
+ "nulls": "last"
1367
+ },
1368
+ {
1369
+ "expression": "status",
1370
+ "isExpression": false,
1371
+ "asc": true,
1372
+ "nulls": "last"
1373
+ }
1374
+ ],
1375
+ "isUnique": false,
1376
+ "concurrently": false,
1377
+ "method": "btree",
1378
+ "with": {}
1379
+ },
1380
+ "chat_room_invite_inviter_pending_idx": {
1381
+ "name": "chat_room_invite_inviter_pending_idx",
1382
+ "columns": [
1383
+ {
1384
+ "expression": "inviter_id",
1385
+ "isExpression": false,
1386
+ "asc": true,
1387
+ "nulls": "last"
1388
+ }
1389
+ ],
1390
+ "isUnique": false,
1391
+ "where": "\"chat_room_invite\".\"status\" = 'pending'",
1392
+ "concurrently": false,
1393
+ "method": "btree",
1394
+ "with": {}
1395
+ },
1396
+ "chat_room_invite_room_idx": {
1397
+ "name": "chat_room_invite_room_idx",
1398
+ "columns": [
1399
+ {
1400
+ "expression": "room_id",
1401
+ "isExpression": false,
1402
+ "asc": true,
1403
+ "nulls": "last"
1404
+ }
1405
+ ],
1406
+ "isUnique": false,
1407
+ "concurrently": false,
1408
+ "method": "btree",
1409
+ "with": {}
1410
+ }
1411
+ },
1412
+ "foreignKeys": {
1413
+ "chat_room_invite_room_id_chat_room_id_fk": {
1414
+ "name": "chat_room_invite_room_id_chat_room_id_fk",
1415
+ "tableFrom": "chat_room_invite",
1416
+ "tableTo": "chat_room",
1417
+ "columnsFrom": ["room_id"],
1418
+ "columnsTo": ["id"],
1419
+ "onDelete": "cascade",
1420
+ "onUpdate": "no action"
1421
+ }
1422
+ },
1423
+ "compositePrimaryKeys": {},
1424
+ "uniqueConstraints": {},
1425
+ "policies": {},
1426
+ "checkConstraints": {},
1427
+ "isRLSEnabled": false
1428
+ },
1429
+ "public.chat_room_member": {
1430
+ "name": "chat_room_member",
1431
+ "schema": "",
1432
+ "columns": {
1433
+ "id": {
1434
+ "name": "id",
1435
+ "type": "uuid",
1436
+ "primaryKey": true,
1437
+ "notNull": true,
1438
+ "default": "gen_random_uuid()"
1439
+ },
1440
+ "room_id": {
1441
+ "name": "room_id",
1442
+ "type": "uuid",
1443
+ "primaryKey": false,
1444
+ "notNull": true
1445
+ },
1446
+ "user_id": {
1447
+ "name": "user_id",
1448
+ "type": "uuid",
1449
+ "primaryKey": false,
1450
+ "notNull": true
1451
+ },
1452
+ "role": {
1453
+ "name": "role",
1454
+ "type": "chat_room_role",
1455
+ "typeSchema": "public",
1456
+ "primaryKey": false,
1457
+ "notNull": true,
1458
+ "default": "'member'"
1459
+ },
1460
+ "role_assigned_at": {
1461
+ "name": "role_assigned_at",
1462
+ "type": "timestamp with time zone",
1463
+ "primaryKey": false,
1464
+ "notNull": false
1465
+ },
1466
+ "account_closed_at": {
1467
+ "name": "account_closed_at",
1468
+ "type": "timestamp with time zone",
1469
+ "primaryKey": false,
1470
+ "notNull": false
1471
+ },
1472
+ "joined_at": {
1473
+ "name": "joined_at",
1474
+ "type": "timestamp with time zone",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "default": "now()"
1478
+ }
1479
+ },
1480
+ "indexes": {
1481
+ "chat_room_member_room_user_key": {
1482
+ "name": "chat_room_member_room_user_key",
1483
+ "columns": [
1484
+ {
1485
+ "expression": "room_id",
1486
+ "isExpression": false,
1487
+ "asc": true,
1488
+ "nulls": "last"
1489
+ },
1490
+ {
1491
+ "expression": "user_id",
1492
+ "isExpression": false,
1493
+ "asc": true,
1494
+ "nulls": "last"
1495
+ }
1496
+ ],
1497
+ "isUnique": true,
1498
+ "concurrently": false,
1499
+ "method": "btree",
1500
+ "with": {}
1501
+ },
1502
+ "chat_room_member_room_idx": {
1503
+ "name": "chat_room_member_room_idx",
1504
+ "columns": [
1505
+ {
1506
+ "expression": "room_id",
1507
+ "isExpression": false,
1508
+ "asc": true,
1509
+ "nulls": "last"
1510
+ }
1511
+ ],
1512
+ "isUnique": false,
1513
+ "concurrently": false,
1514
+ "method": "btree",
1515
+ "with": {}
1516
+ },
1517
+ "chat_room_member_user_idx": {
1518
+ "name": "chat_room_member_user_idx",
1519
+ "columns": [
1520
+ {
1521
+ "expression": "user_id",
1522
+ "isExpression": false,
1523
+ "asc": true,
1524
+ "nulls": "last"
1525
+ }
1526
+ ],
1527
+ "isUnique": false,
1528
+ "concurrently": false,
1529
+ "method": "btree",
1530
+ "with": {}
1531
+ }
1532
+ },
1533
+ "foreignKeys": {
1534
+ "chat_room_member_room_id_chat_room_id_fk": {
1535
+ "name": "chat_room_member_room_id_chat_room_id_fk",
1536
+ "tableFrom": "chat_room_member",
1537
+ "tableTo": "chat_room",
1538
+ "columnsFrom": ["room_id"],
1539
+ "columnsTo": ["id"],
1540
+ "onDelete": "cascade",
1541
+ "onUpdate": "no action"
1542
+ }
1543
+ },
1544
+ "compositePrimaryKeys": {},
1545
+ "uniqueConstraints": {},
1546
+ "policies": {},
1547
+ "checkConstraints": {},
1548
+ "isRLSEnabled": false
1549
+ },
1550
+ "public.chat_room_mute": {
1551
+ "name": "chat_room_mute",
1552
+ "schema": "",
1553
+ "columns": {
1554
+ "id": {
1555
+ "name": "id",
1556
+ "type": "uuid",
1557
+ "primaryKey": true,
1558
+ "notNull": true,
1559
+ "default": "gen_random_uuid()"
1560
+ },
1561
+ "room_id": {
1562
+ "name": "room_id",
1563
+ "type": "uuid",
1564
+ "primaryKey": false,
1565
+ "notNull": true
1566
+ },
1567
+ "user_id": {
1568
+ "name": "user_id",
1569
+ "type": "uuid",
1570
+ "primaryKey": false,
1571
+ "notNull": true
1572
+ },
1573
+ "muted_by": {
1574
+ "name": "muted_by",
1575
+ "type": "uuid",
1576
+ "primaryKey": false,
1577
+ "notNull": true
1578
+ },
1579
+ "reason": {
1580
+ "name": "reason",
1581
+ "type": "text",
1582
+ "primaryKey": false,
1583
+ "notNull": true
1584
+ },
1585
+ "created_at": {
1586
+ "name": "created_at",
1587
+ "type": "timestamp with time zone",
1588
+ "primaryKey": false,
1589
+ "notNull": true,
1590
+ "default": "now()"
1591
+ },
1592
+ "expires_at": {
1593
+ "name": "expires_at",
1594
+ "type": "timestamp with time zone",
1595
+ "primaryKey": false,
1596
+ "notNull": false
1597
+ },
1598
+ "lifted_at": {
1599
+ "name": "lifted_at",
1600
+ "type": "timestamp with time zone",
1601
+ "primaryKey": false,
1602
+ "notNull": false
1603
+ },
1604
+ "lifted_by": {
1605
+ "name": "lifted_by",
1606
+ "type": "uuid",
1607
+ "primaryKey": false,
1608
+ "notNull": false
1609
+ }
1610
+ },
1611
+ "indexes": {
1612
+ "chat_room_mute_active_room_user_key": {
1613
+ "name": "chat_room_mute_active_room_user_key",
1614
+ "columns": [
1615
+ {
1616
+ "expression": "room_id",
1617
+ "isExpression": false,
1618
+ "asc": true,
1619
+ "nulls": "last"
1620
+ },
1621
+ {
1622
+ "expression": "user_id",
1623
+ "isExpression": false,
1624
+ "asc": true,
1625
+ "nulls": "last"
1626
+ }
1627
+ ],
1628
+ "isUnique": true,
1629
+ "where": "\"chat_room_mute\".\"lifted_at\" IS NULL",
1630
+ "concurrently": false,
1631
+ "method": "btree",
1632
+ "with": {}
1633
+ },
1634
+ "chat_room_mute_room_user_idx": {
1635
+ "name": "chat_room_mute_room_user_idx",
1636
+ "columns": [
1637
+ {
1638
+ "expression": "room_id",
1639
+ "isExpression": false,
1640
+ "asc": true,
1641
+ "nulls": "last"
1642
+ },
1643
+ {
1644
+ "expression": "user_id",
1645
+ "isExpression": false,
1646
+ "asc": true,
1647
+ "nulls": "last"
1648
+ }
1649
+ ],
1650
+ "isUnique": false,
1651
+ "concurrently": false,
1652
+ "method": "btree",
1653
+ "with": {}
1654
+ },
1655
+ "chat_room_mute_expires_at_idx": {
1656
+ "name": "chat_room_mute_expires_at_idx",
1657
+ "columns": [
1658
+ {
1659
+ "expression": "expires_at",
1660
+ "isExpression": false,
1661
+ "asc": true,
1662
+ "nulls": "last"
1663
+ }
1664
+ ],
1665
+ "isUnique": false,
1666
+ "concurrently": false,
1667
+ "method": "btree",
1668
+ "with": {}
1669
+ }
1670
+ },
1671
+ "foreignKeys": {
1672
+ "chat_room_mute_room_id_chat_room_id_fk": {
1673
+ "name": "chat_room_mute_room_id_chat_room_id_fk",
1674
+ "tableFrom": "chat_room_mute",
1675
+ "tableTo": "chat_room",
1676
+ "columnsFrom": ["room_id"],
1677
+ "columnsTo": ["id"],
1678
+ "onDelete": "cascade",
1679
+ "onUpdate": "no action"
1680
+ }
1681
+ },
1682
+ "compositePrimaryKeys": {},
1683
+ "uniqueConstraints": {},
1684
+ "policies": {},
1685
+ "checkConstraints": {},
1686
+ "isRLSEnabled": false
1687
+ },
1688
+ "public.chat_room_remove": {
1689
+ "name": "chat_room_remove",
1690
+ "schema": "",
1691
+ "columns": {
1692
+ "id": {
1693
+ "name": "id",
1694
+ "type": "uuid",
1695
+ "primaryKey": true,
1696
+ "notNull": true,
1697
+ "default": "gen_random_uuid()"
1698
+ },
1699
+ "room_id": {
1700
+ "name": "room_id",
1701
+ "type": "uuid",
1702
+ "primaryKey": false,
1703
+ "notNull": true
1704
+ },
1705
+ "user_id": {
1706
+ "name": "user_id",
1707
+ "type": "uuid",
1708
+ "primaryKey": false,
1709
+ "notNull": true
1710
+ },
1711
+ "removed_by": {
1712
+ "name": "removed_by",
1713
+ "type": "uuid",
1714
+ "primaryKey": false,
1715
+ "notNull": true
1716
+ },
1717
+ "reason": {
1718
+ "name": "reason",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": true
1722
+ },
1723
+ "created_at": {
1724
+ "name": "created_at",
1725
+ "type": "timestamp with time zone",
1726
+ "primaryKey": false,
1727
+ "notNull": true,
1728
+ "default": "now()"
1729
+ }
1730
+ },
1731
+ "indexes": {
1732
+ "chat_room_remove_room_created_at_idx": {
1733
+ "name": "chat_room_remove_room_created_at_idx",
1734
+ "columns": [
1735
+ {
1736
+ "expression": "room_id",
1737
+ "isExpression": false,
1738
+ "asc": true,
1739
+ "nulls": "last"
1740
+ },
1741
+ {
1742
+ "expression": "created_at",
1743
+ "isExpression": false,
1744
+ "asc": true,
1745
+ "nulls": "last"
1746
+ }
1747
+ ],
1748
+ "isUnique": false,
1749
+ "concurrently": false,
1750
+ "method": "btree",
1751
+ "with": {}
1752
+ },
1753
+ "chat_room_remove_user_idx": {
1754
+ "name": "chat_room_remove_user_idx",
1755
+ "columns": [
1756
+ {
1757
+ "expression": "user_id",
1758
+ "isExpression": false,
1759
+ "asc": true,
1760
+ "nulls": "last"
1761
+ }
1762
+ ],
1763
+ "isUnique": false,
1764
+ "concurrently": false,
1765
+ "method": "btree",
1766
+ "with": {}
1767
+ }
1768
+ },
1769
+ "foreignKeys": {
1770
+ "chat_room_remove_room_id_chat_room_id_fk": {
1771
+ "name": "chat_room_remove_room_id_chat_room_id_fk",
1772
+ "tableFrom": "chat_room_remove",
1773
+ "tableTo": "chat_room",
1774
+ "columnsFrom": ["room_id"],
1775
+ "columnsTo": ["id"],
1776
+ "onDelete": "cascade",
1777
+ "onUpdate": "no action"
1778
+ }
1779
+ },
1780
+ "compositePrimaryKeys": {},
1781
+ "uniqueConstraints": {},
1782
+ "policies": {},
1783
+ "checkConstraints": {},
1784
+ "isRLSEnabled": false
1785
+ },
1786
+ "public.chat_room_rule": {
1787
+ "name": "chat_room_rule",
1788
+ "schema": "",
1789
+ "columns": {
1790
+ "id": {
1791
+ "name": "id",
1792
+ "type": "uuid",
1793
+ "primaryKey": true,
1794
+ "notNull": true,
1795
+ "default": "gen_random_uuid()"
1796
+ },
1797
+ "room_id": {
1798
+ "name": "room_id",
1799
+ "type": "uuid",
1800
+ "primaryKey": false,
1801
+ "notNull": true
1802
+ },
1803
+ "created_by": {
1804
+ "name": "created_by",
1805
+ "type": "uuid",
1806
+ "primaryKey": false,
1807
+ "notNull": true
1808
+ },
1809
+ "order_num": {
1810
+ "name": "order_num",
1811
+ "type": "integer",
1812
+ "primaryKey": false,
1813
+ "notNull": true
1814
+ },
1815
+ "content": {
1816
+ "name": "content",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": true
1820
+ },
1821
+ "created_at": {
1822
+ "name": "created_at",
1823
+ "type": "timestamp with time zone",
1824
+ "primaryKey": false,
1825
+ "notNull": true,
1826
+ "default": "now()"
1827
+ },
1828
+ "updated_at": {
1829
+ "name": "updated_at",
1830
+ "type": "timestamp with time zone",
1831
+ "primaryKey": false,
1832
+ "notNull": true,
1833
+ "default": "now()"
1834
+ }
1835
+ },
1836
+ "indexes": {
1837
+ "chat_room_rule_room_order_idx": {
1838
+ "name": "chat_room_rule_room_order_idx",
1839
+ "columns": [
1840
+ {
1841
+ "expression": "room_id",
1842
+ "isExpression": false,
1843
+ "asc": true,
1844
+ "nulls": "last"
1845
+ },
1846
+ {
1847
+ "expression": "order_num",
1848
+ "isExpression": false,
1849
+ "asc": true,
1850
+ "nulls": "last"
1851
+ }
1852
+ ],
1853
+ "isUnique": false,
1854
+ "concurrently": false,
1855
+ "method": "btree",
1856
+ "with": {}
1857
+ },
1858
+ "chat_room_rule_room_idx": {
1859
+ "name": "chat_room_rule_room_idx",
1860
+ "columns": [
1861
+ {
1862
+ "expression": "room_id",
1863
+ "isExpression": false,
1864
+ "asc": true,
1865
+ "nulls": "last"
1866
+ }
1867
+ ],
1868
+ "isUnique": false,
1869
+ "concurrently": false,
1870
+ "method": "btree",
1871
+ "with": {}
1872
+ }
1873
+ },
1874
+ "foreignKeys": {
1875
+ "chat_room_rule_room_id_chat_room_id_fk": {
1876
+ "name": "chat_room_rule_room_id_chat_room_id_fk",
1877
+ "tableFrom": "chat_room_rule",
1878
+ "tableTo": "chat_room",
1879
+ "columnsFrom": ["room_id"],
1880
+ "columnsTo": ["id"],
1881
+ "onDelete": "cascade",
1882
+ "onUpdate": "no action"
1883
+ }
1884
+ },
1885
+ "compositePrimaryKeys": {},
1886
+ "uniqueConstraints": {},
1887
+ "policies": {},
1888
+ "checkConstraints": {},
1889
+ "isRLSEnabled": false
1890
+ },
1891
+ "public.chat_user_block": {
1892
+ "name": "chat_user_block",
1893
+ "schema": "",
1894
+ "columns": {
1895
+ "id": {
1896
+ "name": "id",
1897
+ "type": "uuid",
1898
+ "primaryKey": true,
1899
+ "notNull": true,
1900
+ "default": "gen_random_uuid()"
1901
+ },
1902
+ "blocker_id": {
1903
+ "name": "blocker_id",
1904
+ "type": "uuid",
1905
+ "primaryKey": false,
1906
+ "notNull": true
1907
+ },
1908
+ "blocked_id": {
1909
+ "name": "blocked_id",
1910
+ "type": "uuid",
1911
+ "primaryKey": false,
1912
+ "notNull": true
1913
+ },
1914
+ "created_at": {
1915
+ "name": "created_at",
1916
+ "type": "timestamp with time zone",
1917
+ "primaryKey": false,
1918
+ "notNull": true,
1919
+ "default": "now()"
1920
+ },
1921
+ "removed_at": {
1922
+ "name": "removed_at",
1923
+ "type": "timestamp with time zone",
1924
+ "primaryKey": false,
1925
+ "notNull": false
1926
+ }
1927
+ },
1928
+ "indexes": {
1929
+ "chat_user_block_pair_key": {
1930
+ "name": "chat_user_block_pair_key",
1931
+ "columns": [
1932
+ {
1933
+ "expression": "blocker_id",
1934
+ "isExpression": false,
1935
+ "asc": true,
1936
+ "nulls": "last"
1937
+ },
1938
+ {
1939
+ "expression": "blocked_id",
1940
+ "isExpression": false,
1941
+ "asc": true,
1942
+ "nulls": "last"
1943
+ }
1944
+ ],
1945
+ "isUnique": true,
1946
+ "where": "\"chat_user_block\".\"removed_at\" IS NULL",
1947
+ "concurrently": false,
1948
+ "method": "btree",
1949
+ "with": {}
1950
+ },
1951
+ "chat_user_block_blocker_idx": {
1952
+ "name": "chat_user_block_blocker_idx",
1953
+ "columns": [
1954
+ {
1955
+ "expression": "blocker_id",
1956
+ "isExpression": false,
1957
+ "asc": true,
1958
+ "nulls": "last"
1959
+ }
1960
+ ],
1961
+ "isUnique": false,
1962
+ "concurrently": false,
1963
+ "method": "btree",
1964
+ "with": {}
1965
+ }
1966
+ },
1967
+ "foreignKeys": {},
1968
+ "compositePrimaryKeys": {},
1969
+ "uniqueConstraints": {},
1970
+ "policies": {},
1971
+ "checkConstraints": {},
1972
+ "isRLSEnabled": false
1973
+ },
1974
+ "public.chat_user_ignore": {
1975
+ "name": "chat_user_ignore",
1976
+ "schema": "",
1977
+ "columns": {
1978
+ "id": {
1979
+ "name": "id",
1980
+ "type": "uuid",
1981
+ "primaryKey": true,
1982
+ "notNull": true,
1983
+ "default": "gen_random_uuid()"
1984
+ },
1985
+ "ignorer_id": {
1986
+ "name": "ignorer_id",
1987
+ "type": "uuid",
1988
+ "primaryKey": false,
1989
+ "notNull": true
1990
+ },
1991
+ "ignored_id": {
1992
+ "name": "ignored_id",
1993
+ "type": "uuid",
1994
+ "primaryKey": false,
1995
+ "notNull": true
1996
+ },
1997
+ "created_at": {
1998
+ "name": "created_at",
1999
+ "type": "timestamp with time zone",
2000
+ "primaryKey": false,
2001
+ "notNull": true,
2002
+ "default": "now()"
2003
+ },
2004
+ "removed_at": {
2005
+ "name": "removed_at",
2006
+ "type": "timestamp with time zone",
2007
+ "primaryKey": false,
2008
+ "notNull": false
2009
+ }
2010
+ },
2011
+ "indexes": {
2012
+ "chat_user_ignore_pair_key": {
2013
+ "name": "chat_user_ignore_pair_key",
2014
+ "columns": [
2015
+ {
2016
+ "expression": "ignorer_id",
2017
+ "isExpression": false,
2018
+ "asc": true,
2019
+ "nulls": "last"
2020
+ },
2021
+ {
2022
+ "expression": "ignored_id",
2023
+ "isExpression": false,
2024
+ "asc": true,
2025
+ "nulls": "last"
2026
+ }
2027
+ ],
2028
+ "isUnique": true,
2029
+ "where": "\"chat_user_ignore\".\"removed_at\" IS NULL",
2030
+ "concurrently": false,
2031
+ "method": "btree",
2032
+ "with": {}
2033
+ },
2034
+ "chat_user_ignore_ignorer_idx": {
2035
+ "name": "chat_user_ignore_ignorer_idx",
2036
+ "columns": [
2037
+ {
2038
+ "expression": "ignorer_id",
2039
+ "isExpression": false,
2040
+ "asc": true,
2041
+ "nulls": "last"
2042
+ }
2043
+ ],
2044
+ "isUnique": false,
2045
+ "concurrently": false,
2046
+ "method": "btree",
2047
+ "with": {}
2048
+ }
2049
+ },
2050
+ "foreignKeys": {},
2051
+ "compositePrimaryKeys": {},
2052
+ "uniqueConstraints": {},
2053
+ "policies": {},
2054
+ "checkConstraints": {},
2055
+ "isRLSEnabled": false
2056
+ }
2057
+ },
2058
+ "enums": {
2059
+ "public.chat_message_type": {
2060
+ "name": "chat_message_type",
2061
+ "schema": "public",
2062
+ "values": ["user", "system"]
2063
+ },
2064
+ "public.chat_moderation_scope": {
2065
+ "name": "chat_moderation_scope",
2066
+ "schema": "public",
2067
+ "values": ["__global", "__all_public", "__all", "room"]
2068
+ },
2069
+ "public.chat_room_category": {
2070
+ "name": "chat_room_category",
2071
+ "schema": "public",
2072
+ "values": ["games-sports", "regions", "languages", "private-channels"]
2073
+ },
2074
+ "public.chat_room_invite_status": {
2075
+ "name": "chat_room_invite_status",
2076
+ "schema": "public",
2077
+ "values": ["pending", "accepted", "declined", "expired"]
2078
+ },
2079
+ "public.chat_room_kind": {
2080
+ "name": "chat_room_kind",
2081
+ "schema": "public",
2082
+ "values": ["standard", "context"]
2083
+ },
2084
+ "public.chat_room_role": {
2085
+ "name": "chat_room_role",
2086
+ "schema": "public",
2087
+ "values": ["member", "moderator", "owner"]
2088
+ }
2089
+ },
2090
+ "schemas": {},
2091
+ "sequences": {},
2092
+ "roles": {},
2093
+ "policies": {},
2094
+ "views": {},
2095
+ "_meta": {
2096
+ "columns": {},
2097
+ "schemas": {},
2098
+ "tables": {}
2099
+ }
2100
+ }