@checkstack/auth-backend 0.4.33 → 0.5.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,1349 @@
1
+ {
2
+ "id": "ba2d4e17-7f22-4263-ab1d-1447a62c3f23",
3
+ "prevId": "09dc2a16-a3bc-4d59-931b-5eedda7369ca",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.access_rule": {
8
+ "name": "access_rule",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "description": {
18
+ "name": "description",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": false
22
+ }
23
+ },
24
+ "indexes": {},
25
+ "foreignKeys": {},
26
+ "compositePrimaryKeys": {},
27
+ "uniqueConstraints": {},
28
+ "policies": {},
29
+ "checkConstraints": {},
30
+ "isRLSEnabled": false
31
+ },
32
+ "public.account": {
33
+ "name": "account",
34
+ "schema": "",
35
+ "columns": {
36
+ "id": {
37
+ "name": "id",
38
+ "type": "text",
39
+ "primaryKey": true,
40
+ "notNull": true
41
+ },
42
+ "account_id": {
43
+ "name": "account_id",
44
+ "type": "text",
45
+ "primaryKey": false,
46
+ "notNull": true
47
+ },
48
+ "provider_id": {
49
+ "name": "provider_id",
50
+ "type": "text",
51
+ "primaryKey": false,
52
+ "notNull": true
53
+ },
54
+ "user_id": {
55
+ "name": "user_id",
56
+ "type": "text",
57
+ "primaryKey": false,
58
+ "notNull": true
59
+ },
60
+ "access_token": {
61
+ "name": "access_token",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "refresh_token": {
67
+ "name": "refresh_token",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": false
71
+ },
72
+ "id_token": {
73
+ "name": "id_token",
74
+ "type": "text",
75
+ "primaryKey": false,
76
+ "notNull": false
77
+ },
78
+ "access_token_expires_at": {
79
+ "name": "access_token_expires_at",
80
+ "type": "timestamp",
81
+ "primaryKey": false,
82
+ "notNull": false
83
+ },
84
+ "refresh_token_expires_at": {
85
+ "name": "refresh_token_expires_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": false
89
+ },
90
+ "scope": {
91
+ "name": "scope",
92
+ "type": "text",
93
+ "primaryKey": false,
94
+ "notNull": false
95
+ },
96
+ "password": {
97
+ "name": "password",
98
+ "type": "text",
99
+ "primaryKey": false,
100
+ "notNull": false
101
+ },
102
+ "created_at": {
103
+ "name": "created_at",
104
+ "type": "timestamp",
105
+ "primaryKey": false,
106
+ "notNull": true
107
+ },
108
+ "updated_at": {
109
+ "name": "updated_at",
110
+ "type": "timestamp",
111
+ "primaryKey": false,
112
+ "notNull": true
113
+ }
114
+ },
115
+ "indexes": {},
116
+ "foreignKeys": {
117
+ "account_user_id_user_id_fk": {
118
+ "name": "account_user_id_user_id_fk",
119
+ "tableFrom": "account",
120
+ "tableTo": "user",
121
+ "columnsFrom": [
122
+ "user_id"
123
+ ],
124
+ "columnsTo": [
125
+ "id"
126
+ ],
127
+ "onDelete": "no action",
128
+ "onUpdate": "no action"
129
+ }
130
+ },
131
+ "compositePrimaryKeys": {},
132
+ "uniqueConstraints": {},
133
+ "policies": {},
134
+ "checkConstraints": {},
135
+ "isRLSEnabled": false
136
+ },
137
+ "public.ai_rate_limit": {
138
+ "name": "ai_rate_limit",
139
+ "schema": "",
140
+ "columns": {
141
+ "key": {
142
+ "name": "key",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "window_start": {
148
+ "name": "window_start",
149
+ "type": "timestamp",
150
+ "primaryKey": false,
151
+ "notNull": true
152
+ },
153
+ "count": {
154
+ "name": "count",
155
+ "type": "integer",
156
+ "primaryKey": false,
157
+ "notNull": true,
158
+ "default": 0
159
+ }
160
+ },
161
+ "indexes": {
162
+ "ai_rate_limit_key_idx": {
163
+ "name": "ai_rate_limit_key_idx",
164
+ "columns": [
165
+ {
166
+ "expression": "key",
167
+ "isExpression": false,
168
+ "asc": true,
169
+ "nulls": "last"
170
+ },
171
+ {
172
+ "expression": "window_start",
173
+ "isExpression": false,
174
+ "asc": true,
175
+ "nulls": "last"
176
+ }
177
+ ],
178
+ "isUnique": false,
179
+ "concurrently": false,
180
+ "method": "btree",
181
+ "with": {}
182
+ }
183
+ },
184
+ "foreignKeys": {},
185
+ "compositePrimaryKeys": {
186
+ "ai_rate_limit_key_window_start_pk": {
187
+ "name": "ai_rate_limit_key_window_start_pk",
188
+ "columns": [
189
+ "key",
190
+ "window_start"
191
+ ]
192
+ }
193
+ },
194
+ "uniqueConstraints": {},
195
+ "policies": {},
196
+ "checkConstraints": {},
197
+ "isRLSEnabled": false
198
+ },
199
+ "public.application": {
200
+ "name": "application",
201
+ "schema": "",
202
+ "columns": {
203
+ "id": {
204
+ "name": "id",
205
+ "type": "text",
206
+ "primaryKey": true,
207
+ "notNull": true
208
+ },
209
+ "name": {
210
+ "name": "name",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": true
214
+ },
215
+ "description": {
216
+ "name": "description",
217
+ "type": "text",
218
+ "primaryKey": false,
219
+ "notNull": false
220
+ },
221
+ "secret_hash": {
222
+ "name": "secret_hash",
223
+ "type": "text",
224
+ "primaryKey": false,
225
+ "notNull": true
226
+ },
227
+ "created_by_id": {
228
+ "name": "created_by_id",
229
+ "type": "text",
230
+ "primaryKey": false,
231
+ "notNull": true
232
+ },
233
+ "created_at": {
234
+ "name": "created_at",
235
+ "type": "timestamp",
236
+ "primaryKey": false,
237
+ "notNull": true,
238
+ "default": "now()"
239
+ },
240
+ "updated_at": {
241
+ "name": "updated_at",
242
+ "type": "timestamp",
243
+ "primaryKey": false,
244
+ "notNull": true,
245
+ "default": "now()"
246
+ },
247
+ "last_used_at": {
248
+ "name": "last_used_at",
249
+ "type": "timestamp",
250
+ "primaryKey": false,
251
+ "notNull": false
252
+ }
253
+ },
254
+ "indexes": {},
255
+ "foreignKeys": {
256
+ "application_created_by_id_user_id_fk": {
257
+ "name": "application_created_by_id_user_id_fk",
258
+ "tableFrom": "application",
259
+ "tableTo": "user",
260
+ "columnsFrom": [
261
+ "created_by_id"
262
+ ],
263
+ "columnsTo": [
264
+ "id"
265
+ ],
266
+ "onDelete": "no action",
267
+ "onUpdate": "no action"
268
+ }
269
+ },
270
+ "compositePrimaryKeys": {},
271
+ "uniqueConstraints": {},
272
+ "policies": {},
273
+ "checkConstraints": {},
274
+ "isRLSEnabled": false
275
+ },
276
+ "public.application_role": {
277
+ "name": "application_role",
278
+ "schema": "",
279
+ "columns": {
280
+ "application_id": {
281
+ "name": "application_id",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true
285
+ },
286
+ "role_id": {
287
+ "name": "role_id",
288
+ "type": "text",
289
+ "primaryKey": false,
290
+ "notNull": true
291
+ }
292
+ },
293
+ "indexes": {},
294
+ "foreignKeys": {
295
+ "application_role_application_id_application_id_fk": {
296
+ "name": "application_role_application_id_application_id_fk",
297
+ "tableFrom": "application_role",
298
+ "tableTo": "application",
299
+ "columnsFrom": [
300
+ "application_id"
301
+ ],
302
+ "columnsTo": [
303
+ "id"
304
+ ],
305
+ "onDelete": "cascade",
306
+ "onUpdate": "no action"
307
+ },
308
+ "application_role_role_id_role_id_fk": {
309
+ "name": "application_role_role_id_role_id_fk",
310
+ "tableFrom": "application_role",
311
+ "tableTo": "role",
312
+ "columnsFrom": [
313
+ "role_id"
314
+ ],
315
+ "columnsTo": [
316
+ "id"
317
+ ],
318
+ "onDelete": "no action",
319
+ "onUpdate": "no action"
320
+ }
321
+ },
322
+ "compositePrimaryKeys": {
323
+ "application_role_application_id_role_id_pk": {
324
+ "name": "application_role_application_id_role_id_pk",
325
+ "columns": [
326
+ "application_id",
327
+ "role_id"
328
+ ]
329
+ }
330
+ },
331
+ "uniqueConstraints": {},
332
+ "policies": {},
333
+ "checkConstraints": {},
334
+ "isRLSEnabled": false
335
+ },
336
+ "public.application_team": {
337
+ "name": "application_team",
338
+ "schema": "",
339
+ "columns": {
340
+ "application_id": {
341
+ "name": "application_id",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "team_id": {
347
+ "name": "team_id",
348
+ "type": "text",
349
+ "primaryKey": false,
350
+ "notNull": true
351
+ }
352
+ },
353
+ "indexes": {},
354
+ "foreignKeys": {
355
+ "application_team_application_id_application_id_fk": {
356
+ "name": "application_team_application_id_application_id_fk",
357
+ "tableFrom": "application_team",
358
+ "tableTo": "application",
359
+ "columnsFrom": [
360
+ "application_id"
361
+ ],
362
+ "columnsTo": [
363
+ "id"
364
+ ],
365
+ "onDelete": "cascade",
366
+ "onUpdate": "no action"
367
+ },
368
+ "application_team_team_id_team_id_fk": {
369
+ "name": "application_team_team_id_team_id_fk",
370
+ "tableFrom": "application_team",
371
+ "tableTo": "team",
372
+ "columnsFrom": [
373
+ "team_id"
374
+ ],
375
+ "columnsTo": [
376
+ "id"
377
+ ],
378
+ "onDelete": "cascade",
379
+ "onUpdate": "no action"
380
+ }
381
+ },
382
+ "compositePrimaryKeys": {
383
+ "application_team_application_id_team_id_pk": {
384
+ "name": "application_team_application_id_team_id_pk",
385
+ "columns": [
386
+ "application_id",
387
+ "team_id"
388
+ ]
389
+ }
390
+ },
391
+ "uniqueConstraints": {},
392
+ "policies": {},
393
+ "checkConstraints": {},
394
+ "isRLSEnabled": false
395
+ },
396
+ "public.disabled_default_access_rule": {
397
+ "name": "disabled_default_access_rule",
398
+ "schema": "",
399
+ "columns": {
400
+ "access_rule_id": {
401
+ "name": "access_rule_id",
402
+ "type": "text",
403
+ "primaryKey": true,
404
+ "notNull": true
405
+ },
406
+ "disabled_at": {
407
+ "name": "disabled_at",
408
+ "type": "timestamp",
409
+ "primaryKey": false,
410
+ "notNull": true
411
+ }
412
+ },
413
+ "indexes": {},
414
+ "foreignKeys": {
415
+ "disabled_default_access_rule_access_rule_id_access_rule_id_fk": {
416
+ "name": "disabled_default_access_rule_access_rule_id_access_rule_id_fk",
417
+ "tableFrom": "disabled_default_access_rule",
418
+ "tableTo": "access_rule",
419
+ "columnsFrom": [
420
+ "access_rule_id"
421
+ ],
422
+ "columnsTo": [
423
+ "id"
424
+ ],
425
+ "onDelete": "no action",
426
+ "onUpdate": "no action"
427
+ }
428
+ },
429
+ "compositePrimaryKeys": {},
430
+ "uniqueConstraints": {},
431
+ "policies": {},
432
+ "checkConstraints": {},
433
+ "isRLSEnabled": false
434
+ },
435
+ "public.disabled_public_default_access_rule": {
436
+ "name": "disabled_public_default_access_rule",
437
+ "schema": "",
438
+ "columns": {
439
+ "access_rule_id": {
440
+ "name": "access_rule_id",
441
+ "type": "text",
442
+ "primaryKey": true,
443
+ "notNull": true
444
+ },
445
+ "disabled_at": {
446
+ "name": "disabled_at",
447
+ "type": "timestamp",
448
+ "primaryKey": false,
449
+ "notNull": true
450
+ }
451
+ },
452
+ "indexes": {},
453
+ "foreignKeys": {
454
+ "disabled_public_default_access_rule_access_rule_id_access_rule_id_fk": {
455
+ "name": "disabled_public_default_access_rule_access_rule_id_access_rule_id_fk",
456
+ "tableFrom": "disabled_public_default_access_rule",
457
+ "tableTo": "access_rule",
458
+ "columnsFrom": [
459
+ "access_rule_id"
460
+ ],
461
+ "columnsTo": [
462
+ "id"
463
+ ],
464
+ "onDelete": "no action",
465
+ "onUpdate": "no action"
466
+ }
467
+ },
468
+ "compositePrimaryKeys": {},
469
+ "uniqueConstraints": {},
470
+ "policies": {},
471
+ "checkConstraints": {},
472
+ "isRLSEnabled": false
473
+ },
474
+ "public.oauth_access_token": {
475
+ "name": "oauth_access_token",
476
+ "schema": "",
477
+ "columns": {
478
+ "id": {
479
+ "name": "id",
480
+ "type": "text",
481
+ "primaryKey": true,
482
+ "notNull": true
483
+ },
484
+ "access_token": {
485
+ "name": "access_token",
486
+ "type": "text",
487
+ "primaryKey": false,
488
+ "notNull": false
489
+ },
490
+ "refresh_token": {
491
+ "name": "refresh_token",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": false
495
+ },
496
+ "access_token_expires_at": {
497
+ "name": "access_token_expires_at",
498
+ "type": "timestamp",
499
+ "primaryKey": false,
500
+ "notNull": false
501
+ },
502
+ "refresh_token_expires_at": {
503
+ "name": "refresh_token_expires_at",
504
+ "type": "timestamp",
505
+ "primaryKey": false,
506
+ "notNull": false
507
+ },
508
+ "client_id": {
509
+ "name": "client_id",
510
+ "type": "text",
511
+ "primaryKey": false,
512
+ "notNull": false
513
+ },
514
+ "user_id": {
515
+ "name": "user_id",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": false
519
+ },
520
+ "scopes": {
521
+ "name": "scopes",
522
+ "type": "text",
523
+ "primaryKey": false,
524
+ "notNull": false
525
+ },
526
+ "created_at": {
527
+ "name": "created_at",
528
+ "type": "timestamp",
529
+ "primaryKey": false,
530
+ "notNull": false
531
+ },
532
+ "updated_at": {
533
+ "name": "updated_at",
534
+ "type": "timestamp",
535
+ "primaryKey": false,
536
+ "notNull": false
537
+ }
538
+ },
539
+ "indexes": {},
540
+ "foreignKeys": {},
541
+ "compositePrimaryKeys": {},
542
+ "uniqueConstraints": {
543
+ "oauth_access_token_access_token_unique": {
544
+ "name": "oauth_access_token_access_token_unique",
545
+ "nullsNotDistinct": false,
546
+ "columns": [
547
+ "access_token"
548
+ ]
549
+ },
550
+ "oauth_access_token_refresh_token_unique": {
551
+ "name": "oauth_access_token_refresh_token_unique",
552
+ "nullsNotDistinct": false,
553
+ "columns": [
554
+ "refresh_token"
555
+ ]
556
+ }
557
+ },
558
+ "policies": {},
559
+ "checkConstraints": {},
560
+ "isRLSEnabled": false
561
+ },
562
+ "public.oauth_application": {
563
+ "name": "oauth_application",
564
+ "schema": "",
565
+ "columns": {
566
+ "id": {
567
+ "name": "id",
568
+ "type": "text",
569
+ "primaryKey": true,
570
+ "notNull": true
571
+ },
572
+ "name": {
573
+ "name": "name",
574
+ "type": "text",
575
+ "primaryKey": false,
576
+ "notNull": false
577
+ },
578
+ "icon": {
579
+ "name": "icon",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": false
583
+ },
584
+ "metadata": {
585
+ "name": "metadata",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": false
589
+ },
590
+ "client_id": {
591
+ "name": "client_id",
592
+ "type": "text",
593
+ "primaryKey": false,
594
+ "notNull": false
595
+ },
596
+ "client_secret": {
597
+ "name": "client_secret",
598
+ "type": "text",
599
+ "primaryKey": false,
600
+ "notNull": false
601
+ },
602
+ "redirect_urls": {
603
+ "name": "redirect_urls",
604
+ "type": "text",
605
+ "primaryKey": false,
606
+ "notNull": false
607
+ },
608
+ "type": {
609
+ "name": "type",
610
+ "type": "text",
611
+ "primaryKey": false,
612
+ "notNull": false
613
+ },
614
+ "disabled": {
615
+ "name": "disabled",
616
+ "type": "boolean",
617
+ "primaryKey": false,
618
+ "notNull": false,
619
+ "default": false
620
+ },
621
+ "user_id": {
622
+ "name": "user_id",
623
+ "type": "text",
624
+ "primaryKey": false,
625
+ "notNull": false
626
+ },
627
+ "created_at": {
628
+ "name": "created_at",
629
+ "type": "timestamp",
630
+ "primaryKey": false,
631
+ "notNull": false
632
+ },
633
+ "updated_at": {
634
+ "name": "updated_at",
635
+ "type": "timestamp",
636
+ "primaryKey": false,
637
+ "notNull": false
638
+ }
639
+ },
640
+ "indexes": {},
641
+ "foreignKeys": {},
642
+ "compositePrimaryKeys": {},
643
+ "uniqueConstraints": {
644
+ "oauth_application_client_id_unique": {
645
+ "name": "oauth_application_client_id_unique",
646
+ "nullsNotDistinct": false,
647
+ "columns": [
648
+ "client_id"
649
+ ]
650
+ }
651
+ },
652
+ "policies": {},
653
+ "checkConstraints": {},
654
+ "isRLSEnabled": false
655
+ },
656
+ "public.oauth_consent": {
657
+ "name": "oauth_consent",
658
+ "schema": "",
659
+ "columns": {
660
+ "id": {
661
+ "name": "id",
662
+ "type": "text",
663
+ "primaryKey": true,
664
+ "notNull": true
665
+ },
666
+ "client_id": {
667
+ "name": "client_id",
668
+ "type": "text",
669
+ "primaryKey": false,
670
+ "notNull": false
671
+ },
672
+ "user_id": {
673
+ "name": "user_id",
674
+ "type": "text",
675
+ "primaryKey": false,
676
+ "notNull": false
677
+ },
678
+ "scopes": {
679
+ "name": "scopes",
680
+ "type": "text",
681
+ "primaryKey": false,
682
+ "notNull": false
683
+ },
684
+ "created_at": {
685
+ "name": "created_at",
686
+ "type": "timestamp",
687
+ "primaryKey": false,
688
+ "notNull": false
689
+ },
690
+ "updated_at": {
691
+ "name": "updated_at",
692
+ "type": "timestamp",
693
+ "primaryKey": false,
694
+ "notNull": false
695
+ },
696
+ "consent_given": {
697
+ "name": "consent_given",
698
+ "type": "boolean",
699
+ "primaryKey": false,
700
+ "notNull": false
701
+ }
702
+ },
703
+ "indexes": {},
704
+ "foreignKeys": {},
705
+ "compositePrimaryKeys": {},
706
+ "uniqueConstraints": {},
707
+ "policies": {},
708
+ "checkConstraints": {},
709
+ "isRLSEnabled": false
710
+ },
711
+ "public.resource_access_settings": {
712
+ "name": "resource_access_settings",
713
+ "schema": "",
714
+ "columns": {
715
+ "resource_type": {
716
+ "name": "resource_type",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": true
720
+ },
721
+ "resource_id": {
722
+ "name": "resource_id",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": true
726
+ },
727
+ "team_only": {
728
+ "name": "team_only",
729
+ "type": "boolean",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "default": false
733
+ }
734
+ },
735
+ "indexes": {},
736
+ "foreignKeys": {},
737
+ "compositePrimaryKeys": {
738
+ "resource_access_settings_resource_type_resource_id_pk": {
739
+ "name": "resource_access_settings_resource_type_resource_id_pk",
740
+ "columns": [
741
+ "resource_type",
742
+ "resource_id"
743
+ ]
744
+ }
745
+ },
746
+ "uniqueConstraints": {},
747
+ "policies": {},
748
+ "checkConstraints": {},
749
+ "isRLSEnabled": false
750
+ },
751
+ "public.resource_team_access": {
752
+ "name": "resource_team_access",
753
+ "schema": "",
754
+ "columns": {
755
+ "resource_type": {
756
+ "name": "resource_type",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": true
760
+ },
761
+ "resource_id": {
762
+ "name": "resource_id",
763
+ "type": "text",
764
+ "primaryKey": false,
765
+ "notNull": true
766
+ },
767
+ "team_id": {
768
+ "name": "team_id",
769
+ "type": "text",
770
+ "primaryKey": false,
771
+ "notNull": true
772
+ },
773
+ "can_read": {
774
+ "name": "can_read",
775
+ "type": "boolean",
776
+ "primaryKey": false,
777
+ "notNull": true,
778
+ "default": true
779
+ },
780
+ "can_manage": {
781
+ "name": "can_manage",
782
+ "type": "boolean",
783
+ "primaryKey": false,
784
+ "notNull": true,
785
+ "default": false
786
+ }
787
+ },
788
+ "indexes": {},
789
+ "foreignKeys": {
790
+ "resource_team_access_team_id_team_id_fk": {
791
+ "name": "resource_team_access_team_id_team_id_fk",
792
+ "tableFrom": "resource_team_access",
793
+ "tableTo": "team",
794
+ "columnsFrom": [
795
+ "team_id"
796
+ ],
797
+ "columnsTo": [
798
+ "id"
799
+ ],
800
+ "onDelete": "cascade",
801
+ "onUpdate": "no action"
802
+ }
803
+ },
804
+ "compositePrimaryKeys": {
805
+ "resource_team_access_resource_type_resource_id_team_id_pk": {
806
+ "name": "resource_team_access_resource_type_resource_id_team_id_pk",
807
+ "columns": [
808
+ "resource_type",
809
+ "resource_id",
810
+ "team_id"
811
+ ]
812
+ }
813
+ },
814
+ "uniqueConstraints": {},
815
+ "policies": {},
816
+ "checkConstraints": {},
817
+ "isRLSEnabled": false
818
+ },
819
+ "public.role": {
820
+ "name": "role",
821
+ "schema": "",
822
+ "columns": {
823
+ "id": {
824
+ "name": "id",
825
+ "type": "text",
826
+ "primaryKey": true,
827
+ "notNull": true
828
+ },
829
+ "name": {
830
+ "name": "name",
831
+ "type": "text",
832
+ "primaryKey": false,
833
+ "notNull": true
834
+ },
835
+ "description": {
836
+ "name": "description",
837
+ "type": "text",
838
+ "primaryKey": false,
839
+ "notNull": false
840
+ },
841
+ "is_system": {
842
+ "name": "is_system",
843
+ "type": "boolean",
844
+ "primaryKey": false,
845
+ "notNull": false,
846
+ "default": false
847
+ }
848
+ },
849
+ "indexes": {},
850
+ "foreignKeys": {},
851
+ "compositePrimaryKeys": {},
852
+ "uniqueConstraints": {},
853
+ "policies": {},
854
+ "checkConstraints": {},
855
+ "isRLSEnabled": false
856
+ },
857
+ "public.role_access_rule": {
858
+ "name": "role_access_rule",
859
+ "schema": "",
860
+ "columns": {
861
+ "role_id": {
862
+ "name": "role_id",
863
+ "type": "text",
864
+ "primaryKey": false,
865
+ "notNull": true
866
+ },
867
+ "access_rule_id": {
868
+ "name": "access_rule_id",
869
+ "type": "text",
870
+ "primaryKey": false,
871
+ "notNull": true
872
+ }
873
+ },
874
+ "indexes": {},
875
+ "foreignKeys": {
876
+ "role_access_rule_role_id_role_id_fk": {
877
+ "name": "role_access_rule_role_id_role_id_fk",
878
+ "tableFrom": "role_access_rule",
879
+ "tableTo": "role",
880
+ "columnsFrom": [
881
+ "role_id"
882
+ ],
883
+ "columnsTo": [
884
+ "id"
885
+ ],
886
+ "onDelete": "no action",
887
+ "onUpdate": "no action"
888
+ },
889
+ "role_access_rule_access_rule_id_access_rule_id_fk": {
890
+ "name": "role_access_rule_access_rule_id_access_rule_id_fk",
891
+ "tableFrom": "role_access_rule",
892
+ "tableTo": "access_rule",
893
+ "columnsFrom": [
894
+ "access_rule_id"
895
+ ],
896
+ "columnsTo": [
897
+ "id"
898
+ ],
899
+ "onDelete": "no action",
900
+ "onUpdate": "no action"
901
+ }
902
+ },
903
+ "compositePrimaryKeys": {
904
+ "role_access_rule_role_id_access_rule_id_pk": {
905
+ "name": "role_access_rule_role_id_access_rule_id_pk",
906
+ "columns": [
907
+ "role_id",
908
+ "access_rule_id"
909
+ ]
910
+ }
911
+ },
912
+ "uniqueConstraints": {},
913
+ "policies": {},
914
+ "checkConstraints": {},
915
+ "isRLSEnabled": false
916
+ },
917
+ "public.session": {
918
+ "name": "session",
919
+ "schema": "",
920
+ "columns": {
921
+ "id": {
922
+ "name": "id",
923
+ "type": "text",
924
+ "primaryKey": true,
925
+ "notNull": true
926
+ },
927
+ "expires_at": {
928
+ "name": "expires_at",
929
+ "type": "timestamp",
930
+ "primaryKey": false,
931
+ "notNull": true
932
+ },
933
+ "token": {
934
+ "name": "token",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": true
938
+ },
939
+ "created_at": {
940
+ "name": "created_at",
941
+ "type": "timestamp",
942
+ "primaryKey": false,
943
+ "notNull": true
944
+ },
945
+ "updated_at": {
946
+ "name": "updated_at",
947
+ "type": "timestamp",
948
+ "primaryKey": false,
949
+ "notNull": true
950
+ },
951
+ "ip_address": {
952
+ "name": "ip_address",
953
+ "type": "text",
954
+ "primaryKey": false,
955
+ "notNull": false
956
+ },
957
+ "user_agent": {
958
+ "name": "user_agent",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": false
962
+ },
963
+ "user_id": {
964
+ "name": "user_id",
965
+ "type": "text",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ }
969
+ },
970
+ "indexes": {},
971
+ "foreignKeys": {
972
+ "session_user_id_user_id_fk": {
973
+ "name": "session_user_id_user_id_fk",
974
+ "tableFrom": "session",
975
+ "tableTo": "user",
976
+ "columnsFrom": [
977
+ "user_id"
978
+ ],
979
+ "columnsTo": [
980
+ "id"
981
+ ],
982
+ "onDelete": "no action",
983
+ "onUpdate": "no action"
984
+ }
985
+ },
986
+ "compositePrimaryKeys": {},
987
+ "uniqueConstraints": {
988
+ "session_token_unique": {
989
+ "name": "session_token_unique",
990
+ "nullsNotDistinct": false,
991
+ "columns": [
992
+ "token"
993
+ ]
994
+ }
995
+ },
996
+ "policies": {},
997
+ "checkConstraints": {},
998
+ "isRLSEnabled": false
999
+ },
1000
+ "public.team": {
1001
+ "name": "team",
1002
+ "schema": "",
1003
+ "columns": {
1004
+ "id": {
1005
+ "name": "id",
1006
+ "type": "text",
1007
+ "primaryKey": true,
1008
+ "notNull": true
1009
+ },
1010
+ "name": {
1011
+ "name": "name",
1012
+ "type": "text",
1013
+ "primaryKey": false,
1014
+ "notNull": true
1015
+ },
1016
+ "description": {
1017
+ "name": "description",
1018
+ "type": "text",
1019
+ "primaryKey": false,
1020
+ "notNull": false
1021
+ },
1022
+ "created_at": {
1023
+ "name": "created_at",
1024
+ "type": "timestamp",
1025
+ "primaryKey": false,
1026
+ "notNull": true,
1027
+ "default": "now()"
1028
+ },
1029
+ "updated_at": {
1030
+ "name": "updated_at",
1031
+ "type": "timestamp",
1032
+ "primaryKey": false,
1033
+ "notNull": true,
1034
+ "default": "now()"
1035
+ }
1036
+ },
1037
+ "indexes": {},
1038
+ "foreignKeys": {},
1039
+ "compositePrimaryKeys": {},
1040
+ "uniqueConstraints": {},
1041
+ "policies": {},
1042
+ "checkConstraints": {},
1043
+ "isRLSEnabled": false
1044
+ },
1045
+ "public.team_manager": {
1046
+ "name": "team_manager",
1047
+ "schema": "",
1048
+ "columns": {
1049
+ "team_id": {
1050
+ "name": "team_id",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true
1054
+ },
1055
+ "user_id": {
1056
+ "name": "user_id",
1057
+ "type": "text",
1058
+ "primaryKey": false,
1059
+ "notNull": true
1060
+ }
1061
+ },
1062
+ "indexes": {},
1063
+ "foreignKeys": {
1064
+ "team_manager_team_id_team_id_fk": {
1065
+ "name": "team_manager_team_id_team_id_fk",
1066
+ "tableFrom": "team_manager",
1067
+ "tableTo": "team",
1068
+ "columnsFrom": [
1069
+ "team_id"
1070
+ ],
1071
+ "columnsTo": [
1072
+ "id"
1073
+ ],
1074
+ "onDelete": "cascade",
1075
+ "onUpdate": "no action"
1076
+ },
1077
+ "team_manager_user_id_user_id_fk": {
1078
+ "name": "team_manager_user_id_user_id_fk",
1079
+ "tableFrom": "team_manager",
1080
+ "tableTo": "user",
1081
+ "columnsFrom": [
1082
+ "user_id"
1083
+ ],
1084
+ "columnsTo": [
1085
+ "id"
1086
+ ],
1087
+ "onDelete": "cascade",
1088
+ "onUpdate": "no action"
1089
+ }
1090
+ },
1091
+ "compositePrimaryKeys": {
1092
+ "team_manager_team_id_user_id_pk": {
1093
+ "name": "team_manager_team_id_user_id_pk",
1094
+ "columns": [
1095
+ "team_id",
1096
+ "user_id"
1097
+ ]
1098
+ }
1099
+ },
1100
+ "uniqueConstraints": {},
1101
+ "policies": {},
1102
+ "checkConstraints": {},
1103
+ "isRLSEnabled": false
1104
+ },
1105
+ "public.user": {
1106
+ "name": "user",
1107
+ "schema": "",
1108
+ "columns": {
1109
+ "id": {
1110
+ "name": "id",
1111
+ "type": "text",
1112
+ "primaryKey": true,
1113
+ "notNull": true
1114
+ },
1115
+ "name": {
1116
+ "name": "name",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": true
1120
+ },
1121
+ "email": {
1122
+ "name": "email",
1123
+ "type": "text",
1124
+ "primaryKey": false,
1125
+ "notNull": true
1126
+ },
1127
+ "email_verified": {
1128
+ "name": "email_verified",
1129
+ "type": "boolean",
1130
+ "primaryKey": false,
1131
+ "notNull": true
1132
+ },
1133
+ "image": {
1134
+ "name": "image",
1135
+ "type": "text",
1136
+ "primaryKey": false,
1137
+ "notNull": false
1138
+ },
1139
+ "created_at": {
1140
+ "name": "created_at",
1141
+ "type": "timestamp",
1142
+ "primaryKey": false,
1143
+ "notNull": true
1144
+ },
1145
+ "updated_at": {
1146
+ "name": "updated_at",
1147
+ "type": "timestamp",
1148
+ "primaryKey": false,
1149
+ "notNull": true
1150
+ }
1151
+ },
1152
+ "indexes": {},
1153
+ "foreignKeys": {},
1154
+ "compositePrimaryKeys": {},
1155
+ "uniqueConstraints": {
1156
+ "user_email_unique": {
1157
+ "name": "user_email_unique",
1158
+ "nullsNotDistinct": false,
1159
+ "columns": [
1160
+ "email"
1161
+ ]
1162
+ }
1163
+ },
1164
+ "policies": {},
1165
+ "checkConstraints": {},
1166
+ "isRLSEnabled": false
1167
+ },
1168
+ "public.user_role": {
1169
+ "name": "user_role",
1170
+ "schema": "",
1171
+ "columns": {
1172
+ "user_id": {
1173
+ "name": "user_id",
1174
+ "type": "text",
1175
+ "primaryKey": false,
1176
+ "notNull": true
1177
+ },
1178
+ "role_id": {
1179
+ "name": "role_id",
1180
+ "type": "text",
1181
+ "primaryKey": false,
1182
+ "notNull": true
1183
+ }
1184
+ },
1185
+ "indexes": {},
1186
+ "foreignKeys": {
1187
+ "user_role_user_id_user_id_fk": {
1188
+ "name": "user_role_user_id_user_id_fk",
1189
+ "tableFrom": "user_role",
1190
+ "tableTo": "user",
1191
+ "columnsFrom": [
1192
+ "user_id"
1193
+ ],
1194
+ "columnsTo": [
1195
+ "id"
1196
+ ],
1197
+ "onDelete": "no action",
1198
+ "onUpdate": "no action"
1199
+ },
1200
+ "user_role_role_id_role_id_fk": {
1201
+ "name": "user_role_role_id_role_id_fk",
1202
+ "tableFrom": "user_role",
1203
+ "tableTo": "role",
1204
+ "columnsFrom": [
1205
+ "role_id"
1206
+ ],
1207
+ "columnsTo": [
1208
+ "id"
1209
+ ],
1210
+ "onDelete": "no action",
1211
+ "onUpdate": "no action"
1212
+ }
1213
+ },
1214
+ "compositePrimaryKeys": {
1215
+ "user_role_user_id_role_id_pk": {
1216
+ "name": "user_role_user_id_role_id_pk",
1217
+ "columns": [
1218
+ "user_id",
1219
+ "role_id"
1220
+ ]
1221
+ }
1222
+ },
1223
+ "uniqueConstraints": {},
1224
+ "policies": {},
1225
+ "checkConstraints": {},
1226
+ "isRLSEnabled": false
1227
+ },
1228
+ "public.user_team": {
1229
+ "name": "user_team",
1230
+ "schema": "",
1231
+ "columns": {
1232
+ "user_id": {
1233
+ "name": "user_id",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": true
1237
+ },
1238
+ "team_id": {
1239
+ "name": "team_id",
1240
+ "type": "text",
1241
+ "primaryKey": false,
1242
+ "notNull": true
1243
+ }
1244
+ },
1245
+ "indexes": {},
1246
+ "foreignKeys": {
1247
+ "user_team_user_id_user_id_fk": {
1248
+ "name": "user_team_user_id_user_id_fk",
1249
+ "tableFrom": "user_team",
1250
+ "tableTo": "user",
1251
+ "columnsFrom": [
1252
+ "user_id"
1253
+ ],
1254
+ "columnsTo": [
1255
+ "id"
1256
+ ],
1257
+ "onDelete": "cascade",
1258
+ "onUpdate": "no action"
1259
+ },
1260
+ "user_team_team_id_team_id_fk": {
1261
+ "name": "user_team_team_id_team_id_fk",
1262
+ "tableFrom": "user_team",
1263
+ "tableTo": "team",
1264
+ "columnsFrom": [
1265
+ "team_id"
1266
+ ],
1267
+ "columnsTo": [
1268
+ "id"
1269
+ ],
1270
+ "onDelete": "cascade",
1271
+ "onUpdate": "no action"
1272
+ }
1273
+ },
1274
+ "compositePrimaryKeys": {
1275
+ "user_team_user_id_team_id_pk": {
1276
+ "name": "user_team_user_id_team_id_pk",
1277
+ "columns": [
1278
+ "user_id",
1279
+ "team_id"
1280
+ ]
1281
+ }
1282
+ },
1283
+ "uniqueConstraints": {},
1284
+ "policies": {},
1285
+ "checkConstraints": {},
1286
+ "isRLSEnabled": false
1287
+ },
1288
+ "public.verification": {
1289
+ "name": "verification",
1290
+ "schema": "",
1291
+ "columns": {
1292
+ "id": {
1293
+ "name": "id",
1294
+ "type": "text",
1295
+ "primaryKey": true,
1296
+ "notNull": true
1297
+ },
1298
+ "identifier": {
1299
+ "name": "identifier",
1300
+ "type": "text",
1301
+ "primaryKey": false,
1302
+ "notNull": true
1303
+ },
1304
+ "value": {
1305
+ "name": "value",
1306
+ "type": "text",
1307
+ "primaryKey": false,
1308
+ "notNull": true
1309
+ },
1310
+ "expires_at": {
1311
+ "name": "expires_at",
1312
+ "type": "timestamp",
1313
+ "primaryKey": false,
1314
+ "notNull": true
1315
+ },
1316
+ "created_at": {
1317
+ "name": "created_at",
1318
+ "type": "timestamp",
1319
+ "primaryKey": false,
1320
+ "notNull": false
1321
+ },
1322
+ "updated_at": {
1323
+ "name": "updated_at",
1324
+ "type": "timestamp",
1325
+ "primaryKey": false,
1326
+ "notNull": false
1327
+ }
1328
+ },
1329
+ "indexes": {},
1330
+ "foreignKeys": {},
1331
+ "compositePrimaryKeys": {},
1332
+ "uniqueConstraints": {},
1333
+ "policies": {},
1334
+ "checkConstraints": {},
1335
+ "isRLSEnabled": false
1336
+ }
1337
+ },
1338
+ "enums": {},
1339
+ "schemas": {},
1340
+ "sequences": {},
1341
+ "roles": {},
1342
+ "policies": {},
1343
+ "views": {},
1344
+ "_meta": {
1345
+ "columns": {},
1346
+ "schemas": {},
1347
+ "tables": {}
1348
+ }
1349
+ }