@matteai/stma-server 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/index.js +18444 -0
  2. package/dist/index.js.map +1 -0
  3. package/drizzle/0000_nappy_franklin_storm.sql +115 -0
  4. package/drizzle/0001_grey_ogun.sql +1 -0
  5. package/drizzle/0002_crazy_vindicator.sql +1 -0
  6. package/drizzle/0003_tan_puma.sql +1 -0
  7. package/drizzle/0004_dry_selene.sql +40 -0
  8. package/drizzle/0005_hot_the_fallen.sql +103 -0
  9. package/drizzle/0006_cooing_cargill.sql +42 -0
  10. package/drizzle/0007_public_slyde.sql +12 -0
  11. package/drizzle/0008_loving_maestro.sql +9 -0
  12. package/drizzle/0009_cultured_bucky.sql +15 -0
  13. package/drizzle/0010_dazzling_mephisto.sql +26 -0
  14. package/drizzle/0011_kind_toxin.sql +20 -0
  15. package/drizzle/0012_ordinary_jamie_braddock.sql +31 -0
  16. package/drizzle/0013_warm_silk_fever.sql +7 -0
  17. package/drizzle/0014_talented_squadron_sinister.sql +22 -0
  18. package/drizzle/0015_wild_bill_hollister.sql +8 -0
  19. package/drizzle/0016_lucky_shooting_star.sql +8 -0
  20. package/drizzle/0017_same_blindfold.sql +21 -0
  21. package/drizzle/0018_premium_namora.sql +20 -0
  22. package/drizzle/0019_brown_dragon_lord.sql +6 -0
  23. package/drizzle/meta/0000_snapshot.json +845 -0
  24. package/drizzle/meta/0001_snapshot.json +851 -0
  25. package/drizzle/meta/0002_snapshot.json +857 -0
  26. package/drizzle/meta/0003_snapshot.json +863 -0
  27. package/drizzle/meta/0004_snapshot.json +1204 -0
  28. package/drizzle/meta/0005_snapshot.json +2063 -0
  29. package/drizzle/meta/0006_snapshot.json +2080 -0
  30. package/drizzle/meta/0007_snapshot.json +2157 -0
  31. package/drizzle/meta/0008_snapshot.json +2216 -0
  32. package/drizzle/meta/0009_snapshot.json +2314 -0
  33. package/drizzle/meta/0010_snapshot.json +2431 -0
  34. package/drizzle/meta/0011_snapshot.json +2608 -0
  35. package/drizzle/meta/0012_snapshot.json +2870 -0
  36. package/drizzle/meta/0013_snapshot.json +2918 -0
  37. package/drizzle/meta/0014_snapshot.json +3081 -0
  38. package/drizzle/meta/0015_snapshot.json +3093 -0
  39. package/drizzle/meta/0017_snapshot.json +3271 -0
  40. package/drizzle/meta/0018_snapshot.json +3430 -0
  41. package/drizzle/meta/0019_snapshot.json +3466 -0
  42. package/drizzle/meta/_journal.json +146 -0
  43. package/package.json +67 -0
@@ -0,0 +1,1204 @@
1
+ {
2
+ "id": "7e27c3ad-9373-4343-8eea-8326e35e74b4",
3
+ "prevId": "2ab92603-b93a-44ae-9f22-3bd53086cdbb",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.activity": {
8
+ "name": "activity",
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
+ "team_id": {
19
+ "name": "team_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "project_id": {
25
+ "name": "project_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": false
29
+ },
30
+ "user_id": {
31
+ "name": "user_id",
32
+ "type": "uuid",
33
+ "primaryKey": false,
34
+ "notNull": false
35
+ },
36
+ "token_id": {
37
+ "name": "token_id",
38
+ "type": "uuid",
39
+ "primaryKey": false,
40
+ "notNull": false
41
+ },
42
+ "action": {
43
+ "name": "action",
44
+ "type": "text",
45
+ "primaryKey": false,
46
+ "notNull": true
47
+ },
48
+ "detail": {
49
+ "name": "detail",
50
+ "type": "text",
51
+ "primaryKey": false,
52
+ "notNull": false
53
+ },
54
+ "created_at": {
55
+ "name": "created_at",
56
+ "type": "timestamp with time zone",
57
+ "primaryKey": false,
58
+ "notNull": true,
59
+ "default": "now()"
60
+ }
61
+ },
62
+ "indexes": {
63
+ "activity_team_created": {
64
+ "name": "activity_team_created",
65
+ "columns": [
66
+ {
67
+ "expression": "team_id",
68
+ "isExpression": false,
69
+ "asc": true,
70
+ "nulls": "last"
71
+ },
72
+ {
73
+ "expression": "created_at",
74
+ "isExpression": false,
75
+ "asc": true,
76
+ "nulls": "last"
77
+ }
78
+ ],
79
+ "isUnique": false,
80
+ "concurrently": false,
81
+ "method": "btree",
82
+ "with": {}
83
+ }
84
+ },
85
+ "foreignKeys": {
86
+ "activity_team_id_teams_id_fk": {
87
+ "name": "activity_team_id_teams_id_fk",
88
+ "tableFrom": "activity",
89
+ "tableTo": "teams",
90
+ "columnsFrom": [
91
+ "team_id"
92
+ ],
93
+ "columnsTo": [
94
+ "id"
95
+ ],
96
+ "onDelete": "cascade",
97
+ "onUpdate": "no action"
98
+ },
99
+ "activity_project_id_projects_id_fk": {
100
+ "name": "activity_project_id_projects_id_fk",
101
+ "tableFrom": "activity",
102
+ "tableTo": "projects",
103
+ "columnsFrom": [
104
+ "project_id"
105
+ ],
106
+ "columnsTo": [
107
+ "id"
108
+ ],
109
+ "onDelete": "set null",
110
+ "onUpdate": "no action"
111
+ },
112
+ "activity_user_id_users_id_fk": {
113
+ "name": "activity_user_id_users_id_fk",
114
+ "tableFrom": "activity",
115
+ "tableTo": "users",
116
+ "columnsFrom": [
117
+ "user_id"
118
+ ],
119
+ "columnsTo": [
120
+ "id"
121
+ ],
122
+ "onDelete": "set null",
123
+ "onUpdate": "no action"
124
+ },
125
+ "activity_token_id_tokens_id_fk": {
126
+ "name": "activity_token_id_tokens_id_fk",
127
+ "tableFrom": "activity",
128
+ "tableTo": "tokens",
129
+ "columnsFrom": [
130
+ "token_id"
131
+ ],
132
+ "columnsTo": [
133
+ "id"
134
+ ],
135
+ "onDelete": "set null",
136
+ "onUpdate": "no action"
137
+ }
138
+ },
139
+ "compositePrimaryKeys": {},
140
+ "uniqueConstraints": {},
141
+ "policies": {},
142
+ "checkConstraints": {},
143
+ "isRLSEnabled": false
144
+ },
145
+ "public.debug_sessions": {
146
+ "name": "debug_sessions",
147
+ "schema": "",
148
+ "columns": {
149
+ "id": {
150
+ "name": "id",
151
+ "type": "uuid",
152
+ "primaryKey": true,
153
+ "notNull": true,
154
+ "default": "gen_random_uuid()"
155
+ },
156
+ "team_id": {
157
+ "name": "team_id",
158
+ "type": "uuid",
159
+ "primaryKey": false,
160
+ "notNull": true
161
+ },
162
+ "project_id": {
163
+ "name": "project_id",
164
+ "type": "uuid",
165
+ "primaryKey": false,
166
+ "notNull": false
167
+ },
168
+ "kind": {
169
+ "name": "kind",
170
+ "type": "text",
171
+ "primaryKey": false,
172
+ "notNull": true,
173
+ "default": "'debug'"
174
+ },
175
+ "title": {
176
+ "name": "title",
177
+ "type": "text",
178
+ "primaryKey": false,
179
+ "notNull": true
180
+ },
181
+ "status": {
182
+ "name": "status",
183
+ "type": "text",
184
+ "primaryKey": false,
185
+ "notNull": true,
186
+ "default": "'open'"
187
+ },
188
+ "opened_by": {
189
+ "name": "opened_by",
190
+ "type": "uuid",
191
+ "primaryKey": false,
192
+ "notNull": false
193
+ },
194
+ "context": {
195
+ "name": "context",
196
+ "type": "jsonb",
197
+ "primaryKey": false,
198
+ "notNull": false
199
+ },
200
+ "resolution": {
201
+ "name": "resolution",
202
+ "type": "jsonb",
203
+ "primaryKey": false,
204
+ "notNull": false
205
+ },
206
+ "created_at": {
207
+ "name": "created_at",
208
+ "type": "timestamp with time zone",
209
+ "primaryKey": false,
210
+ "notNull": true,
211
+ "default": "now()"
212
+ },
213
+ "resolved_at": {
214
+ "name": "resolved_at",
215
+ "type": "timestamp with time zone",
216
+ "primaryKey": false,
217
+ "notNull": false
218
+ }
219
+ },
220
+ "indexes": {},
221
+ "foreignKeys": {
222
+ "debug_sessions_team_id_teams_id_fk": {
223
+ "name": "debug_sessions_team_id_teams_id_fk",
224
+ "tableFrom": "debug_sessions",
225
+ "tableTo": "teams",
226
+ "columnsFrom": [
227
+ "team_id"
228
+ ],
229
+ "columnsTo": [
230
+ "id"
231
+ ],
232
+ "onDelete": "cascade",
233
+ "onUpdate": "no action"
234
+ },
235
+ "debug_sessions_project_id_projects_id_fk": {
236
+ "name": "debug_sessions_project_id_projects_id_fk",
237
+ "tableFrom": "debug_sessions",
238
+ "tableTo": "projects",
239
+ "columnsFrom": [
240
+ "project_id"
241
+ ],
242
+ "columnsTo": [
243
+ "id"
244
+ ],
245
+ "onDelete": "set null",
246
+ "onUpdate": "no action"
247
+ },
248
+ "debug_sessions_opened_by_users_id_fk": {
249
+ "name": "debug_sessions_opened_by_users_id_fk",
250
+ "tableFrom": "debug_sessions",
251
+ "tableTo": "users",
252
+ "columnsFrom": [
253
+ "opened_by"
254
+ ],
255
+ "columnsTo": [
256
+ "id"
257
+ ],
258
+ "onDelete": "no action",
259
+ "onUpdate": "no action"
260
+ }
261
+ },
262
+ "compositePrimaryKeys": {},
263
+ "uniqueConstraints": {},
264
+ "policies": {},
265
+ "checkConstraints": {},
266
+ "isRLSEnabled": false
267
+ },
268
+ "public.invites": {
269
+ "name": "invites",
270
+ "schema": "",
271
+ "columns": {
272
+ "id": {
273
+ "name": "id",
274
+ "type": "uuid",
275
+ "primaryKey": true,
276
+ "notNull": true,
277
+ "default": "gen_random_uuid()"
278
+ },
279
+ "team_id": {
280
+ "name": "team_id",
281
+ "type": "uuid",
282
+ "primaryKey": false,
283
+ "notNull": true
284
+ },
285
+ "code": {
286
+ "name": "code",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": true
290
+ },
291
+ "created_by": {
292
+ "name": "created_by",
293
+ "type": "uuid",
294
+ "primaryKey": false,
295
+ "notNull": false
296
+ },
297
+ "expires_at": {
298
+ "name": "expires_at",
299
+ "type": "timestamp with time zone",
300
+ "primaryKey": false,
301
+ "notNull": true
302
+ },
303
+ "uses": {
304
+ "name": "uses",
305
+ "type": "integer",
306
+ "primaryKey": false,
307
+ "notNull": true,
308
+ "default": 0
309
+ },
310
+ "max_uses": {
311
+ "name": "max_uses",
312
+ "type": "integer",
313
+ "primaryKey": false,
314
+ "notNull": false
315
+ },
316
+ "created_at": {
317
+ "name": "created_at",
318
+ "type": "timestamp with time zone",
319
+ "primaryKey": false,
320
+ "notNull": true,
321
+ "default": "now()"
322
+ }
323
+ },
324
+ "indexes": {},
325
+ "foreignKeys": {
326
+ "invites_team_id_teams_id_fk": {
327
+ "name": "invites_team_id_teams_id_fk",
328
+ "tableFrom": "invites",
329
+ "tableTo": "teams",
330
+ "columnsFrom": [
331
+ "team_id"
332
+ ],
333
+ "columnsTo": [
334
+ "id"
335
+ ],
336
+ "onDelete": "cascade",
337
+ "onUpdate": "no action"
338
+ },
339
+ "invites_created_by_users_id_fk": {
340
+ "name": "invites_created_by_users_id_fk",
341
+ "tableFrom": "invites",
342
+ "tableTo": "users",
343
+ "columnsFrom": [
344
+ "created_by"
345
+ ],
346
+ "columnsTo": [
347
+ "id"
348
+ ],
349
+ "onDelete": "no action",
350
+ "onUpdate": "no action"
351
+ }
352
+ },
353
+ "compositePrimaryKeys": {},
354
+ "uniqueConstraints": {
355
+ "invites_code_unique": {
356
+ "name": "invites_code_unique",
357
+ "nullsNotDistinct": false,
358
+ "columns": [
359
+ "code"
360
+ ]
361
+ }
362
+ },
363
+ "policies": {},
364
+ "checkConstraints": {},
365
+ "isRLSEnabled": false
366
+ },
367
+ "public.memberships": {
368
+ "name": "memberships",
369
+ "schema": "",
370
+ "columns": {
371
+ "team_id": {
372
+ "name": "team_id",
373
+ "type": "uuid",
374
+ "primaryKey": false,
375
+ "notNull": true
376
+ },
377
+ "user_id": {
378
+ "name": "user_id",
379
+ "type": "uuid",
380
+ "primaryKey": false,
381
+ "notNull": true
382
+ },
383
+ "role": {
384
+ "name": "role",
385
+ "type": "text",
386
+ "primaryKey": false,
387
+ "notNull": true,
388
+ "default": "'member'"
389
+ },
390
+ "created_at": {
391
+ "name": "created_at",
392
+ "type": "timestamp with time zone",
393
+ "primaryKey": false,
394
+ "notNull": true,
395
+ "default": "now()"
396
+ }
397
+ },
398
+ "indexes": {},
399
+ "foreignKeys": {
400
+ "memberships_team_id_teams_id_fk": {
401
+ "name": "memberships_team_id_teams_id_fk",
402
+ "tableFrom": "memberships",
403
+ "tableTo": "teams",
404
+ "columnsFrom": [
405
+ "team_id"
406
+ ],
407
+ "columnsTo": [
408
+ "id"
409
+ ],
410
+ "onDelete": "cascade",
411
+ "onUpdate": "no action"
412
+ },
413
+ "memberships_user_id_users_id_fk": {
414
+ "name": "memberships_user_id_users_id_fk",
415
+ "tableFrom": "memberships",
416
+ "tableTo": "users",
417
+ "columnsFrom": [
418
+ "user_id"
419
+ ],
420
+ "columnsTo": [
421
+ "id"
422
+ ],
423
+ "onDelete": "cascade",
424
+ "onUpdate": "no action"
425
+ }
426
+ },
427
+ "compositePrimaryKeys": {
428
+ "memberships_team_id_user_id_pk": {
429
+ "name": "memberships_team_id_user_id_pk",
430
+ "columns": [
431
+ "team_id",
432
+ "user_id"
433
+ ]
434
+ }
435
+ },
436
+ "uniqueConstraints": {},
437
+ "policies": {},
438
+ "checkConstraints": {},
439
+ "isRLSEnabled": false
440
+ },
441
+ "public.messages": {
442
+ "name": "messages",
443
+ "schema": "",
444
+ "columns": {
445
+ "id": {
446
+ "name": "id",
447
+ "type": "uuid",
448
+ "primaryKey": true,
449
+ "notNull": true,
450
+ "default": "gen_random_uuid()"
451
+ },
452
+ "session_id": {
453
+ "name": "session_id",
454
+ "type": "uuid",
455
+ "primaryKey": false,
456
+ "notNull": true
457
+ },
458
+ "author_id": {
459
+ "name": "author_id",
460
+ "type": "uuid",
461
+ "primaryKey": false,
462
+ "notNull": false
463
+ },
464
+ "token_id": {
465
+ "name": "token_id",
466
+ "type": "uuid",
467
+ "primaryKey": false,
468
+ "notNull": false
469
+ },
470
+ "kind": {
471
+ "name": "kind",
472
+ "type": "text",
473
+ "primaryKey": false,
474
+ "notNull": true,
475
+ "default": "'note'"
476
+ },
477
+ "via": {
478
+ "name": "via",
479
+ "type": "text",
480
+ "primaryKey": false,
481
+ "notNull": false
482
+ },
483
+ "body": {
484
+ "name": "body",
485
+ "type": "text",
486
+ "primaryKey": false,
487
+ "notNull": true
488
+ },
489
+ "attachments": {
490
+ "name": "attachments",
491
+ "type": "jsonb",
492
+ "primaryKey": false,
493
+ "notNull": false
494
+ },
495
+ "created_at": {
496
+ "name": "created_at",
497
+ "type": "timestamp with time zone",
498
+ "primaryKey": false,
499
+ "notNull": true,
500
+ "default": "now()"
501
+ }
502
+ },
503
+ "indexes": {
504
+ "messages_session_created": {
505
+ "name": "messages_session_created",
506
+ "columns": [
507
+ {
508
+ "expression": "session_id",
509
+ "isExpression": false,
510
+ "asc": true,
511
+ "nulls": "last"
512
+ },
513
+ {
514
+ "expression": "created_at",
515
+ "isExpression": false,
516
+ "asc": true,
517
+ "nulls": "last"
518
+ }
519
+ ],
520
+ "isUnique": false,
521
+ "concurrently": false,
522
+ "method": "btree",
523
+ "with": {}
524
+ }
525
+ },
526
+ "foreignKeys": {
527
+ "messages_session_id_debug_sessions_id_fk": {
528
+ "name": "messages_session_id_debug_sessions_id_fk",
529
+ "tableFrom": "messages",
530
+ "tableTo": "debug_sessions",
531
+ "columnsFrom": [
532
+ "session_id"
533
+ ],
534
+ "columnsTo": [
535
+ "id"
536
+ ],
537
+ "onDelete": "cascade",
538
+ "onUpdate": "no action"
539
+ },
540
+ "messages_author_id_users_id_fk": {
541
+ "name": "messages_author_id_users_id_fk",
542
+ "tableFrom": "messages",
543
+ "tableTo": "users",
544
+ "columnsFrom": [
545
+ "author_id"
546
+ ],
547
+ "columnsTo": [
548
+ "id"
549
+ ],
550
+ "onDelete": "no action",
551
+ "onUpdate": "no action"
552
+ },
553
+ "messages_token_id_tokens_id_fk": {
554
+ "name": "messages_token_id_tokens_id_fk",
555
+ "tableFrom": "messages",
556
+ "tableTo": "tokens",
557
+ "columnsFrom": [
558
+ "token_id"
559
+ ],
560
+ "columnsTo": [
561
+ "id"
562
+ ],
563
+ "onDelete": "set null",
564
+ "onUpdate": "no action"
565
+ }
566
+ },
567
+ "compositePrimaryKeys": {},
568
+ "uniqueConstraints": {},
569
+ "policies": {},
570
+ "checkConstraints": {},
571
+ "isRLSEnabled": false
572
+ },
573
+ "public.projects": {
574
+ "name": "projects",
575
+ "schema": "",
576
+ "columns": {
577
+ "id": {
578
+ "name": "id",
579
+ "type": "uuid",
580
+ "primaryKey": true,
581
+ "notNull": true,
582
+ "default": "gen_random_uuid()"
583
+ },
584
+ "team_id": {
585
+ "name": "team_id",
586
+ "type": "uuid",
587
+ "primaryKey": false,
588
+ "notNull": true
589
+ },
590
+ "name": {
591
+ "name": "name",
592
+ "type": "text",
593
+ "primaryKey": false,
594
+ "notNull": true
595
+ },
596
+ "slug": {
597
+ "name": "slug",
598
+ "type": "text",
599
+ "primaryKey": false,
600
+ "notNull": true
601
+ },
602
+ "created_by": {
603
+ "name": "created_by",
604
+ "type": "uuid",
605
+ "primaryKey": false,
606
+ "notNull": false
607
+ },
608
+ "created_at": {
609
+ "name": "created_at",
610
+ "type": "timestamp with time zone",
611
+ "primaryKey": false,
612
+ "notNull": true,
613
+ "default": "now()"
614
+ }
615
+ },
616
+ "indexes": {
617
+ "projects_team_slug": {
618
+ "name": "projects_team_slug",
619
+ "columns": [
620
+ {
621
+ "expression": "team_id",
622
+ "isExpression": false,
623
+ "asc": true,
624
+ "nulls": "last"
625
+ },
626
+ {
627
+ "expression": "slug",
628
+ "isExpression": false,
629
+ "asc": true,
630
+ "nulls": "last"
631
+ }
632
+ ],
633
+ "isUnique": true,
634
+ "concurrently": false,
635
+ "method": "btree",
636
+ "with": {}
637
+ }
638
+ },
639
+ "foreignKeys": {
640
+ "projects_team_id_teams_id_fk": {
641
+ "name": "projects_team_id_teams_id_fk",
642
+ "tableFrom": "projects",
643
+ "tableTo": "teams",
644
+ "columnsFrom": [
645
+ "team_id"
646
+ ],
647
+ "columnsTo": [
648
+ "id"
649
+ ],
650
+ "onDelete": "cascade",
651
+ "onUpdate": "no action"
652
+ },
653
+ "projects_created_by_users_id_fk": {
654
+ "name": "projects_created_by_users_id_fk",
655
+ "tableFrom": "projects",
656
+ "tableTo": "users",
657
+ "columnsFrom": [
658
+ "created_by"
659
+ ],
660
+ "columnsTo": [
661
+ "id"
662
+ ],
663
+ "onDelete": "no action",
664
+ "onUpdate": "no action"
665
+ }
666
+ },
667
+ "compositePrimaryKeys": {},
668
+ "uniqueConstraints": {},
669
+ "policies": {},
670
+ "checkConstraints": {},
671
+ "isRLSEnabled": false
672
+ },
673
+ "public.read_state": {
674
+ "name": "read_state",
675
+ "schema": "",
676
+ "columns": {
677
+ "user_id": {
678
+ "name": "user_id",
679
+ "type": "uuid",
680
+ "primaryKey": false,
681
+ "notNull": true
682
+ },
683
+ "session_id": {
684
+ "name": "session_id",
685
+ "type": "uuid",
686
+ "primaryKey": false,
687
+ "notNull": true
688
+ },
689
+ "last_read_at": {
690
+ "name": "last_read_at",
691
+ "type": "timestamp with time zone",
692
+ "primaryKey": false,
693
+ "notNull": true,
694
+ "default": "now()"
695
+ }
696
+ },
697
+ "indexes": {},
698
+ "foreignKeys": {
699
+ "read_state_user_id_users_id_fk": {
700
+ "name": "read_state_user_id_users_id_fk",
701
+ "tableFrom": "read_state",
702
+ "tableTo": "users",
703
+ "columnsFrom": [
704
+ "user_id"
705
+ ],
706
+ "columnsTo": [
707
+ "id"
708
+ ],
709
+ "onDelete": "cascade",
710
+ "onUpdate": "no action"
711
+ },
712
+ "read_state_session_id_debug_sessions_id_fk": {
713
+ "name": "read_state_session_id_debug_sessions_id_fk",
714
+ "tableFrom": "read_state",
715
+ "tableTo": "debug_sessions",
716
+ "columnsFrom": [
717
+ "session_id"
718
+ ],
719
+ "columnsTo": [
720
+ "id"
721
+ ],
722
+ "onDelete": "cascade",
723
+ "onUpdate": "no action"
724
+ }
725
+ },
726
+ "compositePrimaryKeys": {
727
+ "read_state_user_id_session_id_pk": {
728
+ "name": "read_state_user_id_session_id_pk",
729
+ "columns": [
730
+ "user_id",
731
+ "session_id"
732
+ ]
733
+ }
734
+ },
735
+ "uniqueConstraints": {},
736
+ "policies": {},
737
+ "checkConstraints": {},
738
+ "isRLSEnabled": false
739
+ },
740
+ "public.snapshots": {
741
+ "name": "snapshots",
742
+ "schema": "",
743
+ "columns": {
744
+ "id": {
745
+ "name": "id",
746
+ "type": "uuid",
747
+ "primaryKey": true,
748
+ "notNull": true,
749
+ "default": "gen_random_uuid()"
750
+ },
751
+ "team_id": {
752
+ "name": "team_id",
753
+ "type": "uuid",
754
+ "primaryKey": false,
755
+ "notNull": true
756
+ },
757
+ "user_id": {
758
+ "name": "user_id",
759
+ "type": "uuid",
760
+ "primaryKey": false,
761
+ "notNull": true
762
+ },
763
+ "repo": {
764
+ "name": "repo",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": false
768
+ },
769
+ "project_id": {
770
+ "name": "project_id",
771
+ "type": "uuid",
772
+ "primaryKey": false,
773
+ "notNull": false
774
+ },
775
+ "token_id": {
776
+ "name": "token_id",
777
+ "type": "uuid",
778
+ "primaryKey": false,
779
+ "notNull": false
780
+ },
781
+ "data": {
782
+ "name": "data",
783
+ "type": "jsonb",
784
+ "primaryKey": false,
785
+ "notNull": true
786
+ },
787
+ "created_at": {
788
+ "name": "created_at",
789
+ "type": "timestamp with time zone",
790
+ "primaryKey": false,
791
+ "notNull": true,
792
+ "default": "now()"
793
+ }
794
+ },
795
+ "indexes": {
796
+ "snapshots_team_user_created": {
797
+ "name": "snapshots_team_user_created",
798
+ "columns": [
799
+ {
800
+ "expression": "team_id",
801
+ "isExpression": false,
802
+ "asc": true,
803
+ "nulls": "last"
804
+ },
805
+ {
806
+ "expression": "user_id",
807
+ "isExpression": false,
808
+ "asc": true,
809
+ "nulls": "last"
810
+ },
811
+ {
812
+ "expression": "created_at",
813
+ "isExpression": false,
814
+ "asc": true,
815
+ "nulls": "last"
816
+ }
817
+ ],
818
+ "isUnique": false,
819
+ "concurrently": false,
820
+ "method": "btree",
821
+ "with": {}
822
+ }
823
+ },
824
+ "foreignKeys": {
825
+ "snapshots_team_id_teams_id_fk": {
826
+ "name": "snapshots_team_id_teams_id_fk",
827
+ "tableFrom": "snapshots",
828
+ "tableTo": "teams",
829
+ "columnsFrom": [
830
+ "team_id"
831
+ ],
832
+ "columnsTo": [
833
+ "id"
834
+ ],
835
+ "onDelete": "cascade",
836
+ "onUpdate": "no action"
837
+ },
838
+ "snapshots_user_id_users_id_fk": {
839
+ "name": "snapshots_user_id_users_id_fk",
840
+ "tableFrom": "snapshots",
841
+ "tableTo": "users",
842
+ "columnsFrom": [
843
+ "user_id"
844
+ ],
845
+ "columnsTo": [
846
+ "id"
847
+ ],
848
+ "onDelete": "cascade",
849
+ "onUpdate": "no action"
850
+ },
851
+ "snapshots_project_id_projects_id_fk": {
852
+ "name": "snapshots_project_id_projects_id_fk",
853
+ "tableFrom": "snapshots",
854
+ "tableTo": "projects",
855
+ "columnsFrom": [
856
+ "project_id"
857
+ ],
858
+ "columnsTo": [
859
+ "id"
860
+ ],
861
+ "onDelete": "cascade",
862
+ "onUpdate": "no action"
863
+ },
864
+ "snapshots_token_id_tokens_id_fk": {
865
+ "name": "snapshots_token_id_tokens_id_fk",
866
+ "tableFrom": "snapshots",
867
+ "tableTo": "tokens",
868
+ "columnsFrom": [
869
+ "token_id"
870
+ ],
871
+ "columnsTo": [
872
+ "id"
873
+ ],
874
+ "onDelete": "set null",
875
+ "onUpdate": "no action"
876
+ }
877
+ },
878
+ "compositePrimaryKeys": {},
879
+ "uniqueConstraints": {},
880
+ "policies": {},
881
+ "checkConstraints": {},
882
+ "isRLSEnabled": false
883
+ },
884
+ "public.teams": {
885
+ "name": "teams",
886
+ "schema": "",
887
+ "columns": {
888
+ "id": {
889
+ "name": "id",
890
+ "type": "uuid",
891
+ "primaryKey": true,
892
+ "notNull": true,
893
+ "default": "gen_random_uuid()"
894
+ },
895
+ "name": {
896
+ "name": "name",
897
+ "type": "text",
898
+ "primaryKey": false,
899
+ "notNull": true
900
+ },
901
+ "slug": {
902
+ "name": "slug",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": true
906
+ },
907
+ "created_by": {
908
+ "name": "created_by",
909
+ "type": "uuid",
910
+ "primaryKey": false,
911
+ "notNull": false
912
+ },
913
+ "webhook_url": {
914
+ "name": "webhook_url",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": false
918
+ },
919
+ "plan": {
920
+ "name": "plan",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "default": "'free'"
925
+ },
926
+ "inbound_token": {
927
+ "name": "inbound_token",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": false
931
+ },
932
+ "created_at": {
933
+ "name": "created_at",
934
+ "type": "timestamp with time zone",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "default": "now()"
938
+ }
939
+ },
940
+ "indexes": {},
941
+ "foreignKeys": {
942
+ "teams_created_by_users_id_fk": {
943
+ "name": "teams_created_by_users_id_fk",
944
+ "tableFrom": "teams",
945
+ "tableTo": "users",
946
+ "columnsFrom": [
947
+ "created_by"
948
+ ],
949
+ "columnsTo": [
950
+ "id"
951
+ ],
952
+ "onDelete": "no action",
953
+ "onUpdate": "no action"
954
+ }
955
+ },
956
+ "compositePrimaryKeys": {},
957
+ "uniqueConstraints": {
958
+ "teams_slug_unique": {
959
+ "name": "teams_slug_unique",
960
+ "nullsNotDistinct": false,
961
+ "columns": [
962
+ "slug"
963
+ ]
964
+ },
965
+ "teams_inbound_token_unique": {
966
+ "name": "teams_inbound_token_unique",
967
+ "nullsNotDistinct": false,
968
+ "columns": [
969
+ "inbound_token"
970
+ ]
971
+ }
972
+ },
973
+ "policies": {},
974
+ "checkConstraints": {},
975
+ "isRLSEnabled": false
976
+ },
977
+ "public.tokens": {
978
+ "name": "tokens",
979
+ "schema": "",
980
+ "columns": {
981
+ "id": {
982
+ "name": "id",
983
+ "type": "uuid",
984
+ "primaryKey": true,
985
+ "notNull": true,
986
+ "default": "gen_random_uuid()"
987
+ },
988
+ "user_id": {
989
+ "name": "user_id",
990
+ "type": "uuid",
991
+ "primaryKey": false,
992
+ "notNull": true
993
+ },
994
+ "name": {
995
+ "name": "name",
996
+ "type": "text",
997
+ "primaryKey": false,
998
+ "notNull": true
999
+ },
1000
+ "token_hash": {
1001
+ "name": "token_hash",
1002
+ "type": "text",
1003
+ "primaryKey": false,
1004
+ "notNull": true
1005
+ },
1006
+ "prefix": {
1007
+ "name": "prefix",
1008
+ "type": "text",
1009
+ "primaryKey": false,
1010
+ "notNull": true
1011
+ },
1012
+ "last_used_at": {
1013
+ "name": "last_used_at",
1014
+ "type": "timestamp with time zone",
1015
+ "primaryKey": false,
1016
+ "notNull": false
1017
+ },
1018
+ "revoked_at": {
1019
+ "name": "revoked_at",
1020
+ "type": "timestamp with time zone",
1021
+ "primaryKey": false,
1022
+ "notNull": false
1023
+ },
1024
+ "created_at": {
1025
+ "name": "created_at",
1026
+ "type": "timestamp with time zone",
1027
+ "primaryKey": false,
1028
+ "notNull": true,
1029
+ "default": "now()"
1030
+ }
1031
+ },
1032
+ "indexes": {},
1033
+ "foreignKeys": {
1034
+ "tokens_user_id_users_id_fk": {
1035
+ "name": "tokens_user_id_users_id_fk",
1036
+ "tableFrom": "tokens",
1037
+ "tableTo": "users",
1038
+ "columnsFrom": [
1039
+ "user_id"
1040
+ ],
1041
+ "columnsTo": [
1042
+ "id"
1043
+ ],
1044
+ "onDelete": "cascade",
1045
+ "onUpdate": "no action"
1046
+ }
1047
+ },
1048
+ "compositePrimaryKeys": {},
1049
+ "uniqueConstraints": {
1050
+ "tokens_token_hash_unique": {
1051
+ "name": "tokens_token_hash_unique",
1052
+ "nullsNotDistinct": false,
1053
+ "columns": [
1054
+ "token_hash"
1055
+ ]
1056
+ }
1057
+ },
1058
+ "policies": {},
1059
+ "checkConstraints": {},
1060
+ "isRLSEnabled": false
1061
+ },
1062
+ "public.users": {
1063
+ "name": "users",
1064
+ "schema": "",
1065
+ "columns": {
1066
+ "id": {
1067
+ "name": "id",
1068
+ "type": "uuid",
1069
+ "primaryKey": true,
1070
+ "notNull": true,
1071
+ "default": "gen_random_uuid()"
1072
+ },
1073
+ "github_id": {
1074
+ "name": "github_id",
1075
+ "type": "bigint",
1076
+ "primaryKey": false,
1077
+ "notNull": false
1078
+ },
1079
+ "username": {
1080
+ "name": "username",
1081
+ "type": "text",
1082
+ "primaryKey": false,
1083
+ "notNull": true
1084
+ },
1085
+ "password_hash": {
1086
+ "name": "password_hash",
1087
+ "type": "text",
1088
+ "primaryKey": false,
1089
+ "notNull": false
1090
+ },
1091
+ "display_name": {
1092
+ "name": "display_name",
1093
+ "type": "text",
1094
+ "primaryKey": false,
1095
+ "notNull": false
1096
+ },
1097
+ "email": {
1098
+ "name": "email",
1099
+ "type": "text",
1100
+ "primaryKey": false,
1101
+ "notNull": false
1102
+ },
1103
+ "avatar_url": {
1104
+ "name": "avatar_url",
1105
+ "type": "text",
1106
+ "primaryKey": false,
1107
+ "notNull": false
1108
+ },
1109
+ "created_at": {
1110
+ "name": "created_at",
1111
+ "type": "timestamp with time zone",
1112
+ "primaryKey": false,
1113
+ "notNull": true,
1114
+ "default": "now()"
1115
+ }
1116
+ },
1117
+ "indexes": {},
1118
+ "foreignKeys": {},
1119
+ "compositePrimaryKeys": {},
1120
+ "uniqueConstraints": {
1121
+ "users_github_id_unique": {
1122
+ "name": "users_github_id_unique",
1123
+ "nullsNotDistinct": false,
1124
+ "columns": [
1125
+ "github_id"
1126
+ ]
1127
+ },
1128
+ "users_username_unique": {
1129
+ "name": "users_username_unique",
1130
+ "nullsNotDistinct": false,
1131
+ "columns": [
1132
+ "username"
1133
+ ]
1134
+ }
1135
+ },
1136
+ "policies": {},
1137
+ "checkConstraints": {},
1138
+ "isRLSEnabled": false
1139
+ },
1140
+ "public.web_sessions": {
1141
+ "name": "web_sessions",
1142
+ "schema": "",
1143
+ "columns": {
1144
+ "id": {
1145
+ "name": "id",
1146
+ "type": "text",
1147
+ "primaryKey": true,
1148
+ "notNull": true
1149
+ },
1150
+ "user_id": {
1151
+ "name": "user_id",
1152
+ "type": "uuid",
1153
+ "primaryKey": false,
1154
+ "notNull": true
1155
+ },
1156
+ "expires_at": {
1157
+ "name": "expires_at",
1158
+ "type": "timestamp with time zone",
1159
+ "primaryKey": false,
1160
+ "notNull": true
1161
+ },
1162
+ "created_at": {
1163
+ "name": "created_at",
1164
+ "type": "timestamp with time zone",
1165
+ "primaryKey": false,
1166
+ "notNull": true,
1167
+ "default": "now()"
1168
+ }
1169
+ },
1170
+ "indexes": {},
1171
+ "foreignKeys": {
1172
+ "web_sessions_user_id_users_id_fk": {
1173
+ "name": "web_sessions_user_id_users_id_fk",
1174
+ "tableFrom": "web_sessions",
1175
+ "tableTo": "users",
1176
+ "columnsFrom": [
1177
+ "user_id"
1178
+ ],
1179
+ "columnsTo": [
1180
+ "id"
1181
+ ],
1182
+ "onDelete": "cascade",
1183
+ "onUpdate": "no action"
1184
+ }
1185
+ },
1186
+ "compositePrimaryKeys": {},
1187
+ "uniqueConstraints": {},
1188
+ "policies": {},
1189
+ "checkConstraints": {},
1190
+ "isRLSEnabled": false
1191
+ }
1192
+ },
1193
+ "enums": {},
1194
+ "schemas": {},
1195
+ "sequences": {},
1196
+ "roles": {},
1197
+ "policies": {},
1198
+ "views": {},
1199
+ "_meta": {
1200
+ "columns": {},
1201
+ "schemas": {},
1202
+ "tables": {}
1203
+ }
1204
+ }