@checkstack/auth-backend 0.0.2

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,717 @@
1
+ {
2
+ "id": "115b1404-1de4-4384-93b1-aec9fa3c75a1",
3
+ "prevId": "36cfd7db-c663-4378-a04e-496ccafb177a",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.account": {
8
+ "name": "account",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "account_id": {
18
+ "name": "account_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "provider_id": {
24
+ "name": "provider_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "user_id": {
30
+ "name": "user_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "access_token": {
36
+ "name": "access_token",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "refresh_token": {
42
+ "name": "refresh_token",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "id_token": {
48
+ "name": "id_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "access_token_expires_at": {
54
+ "name": "access_token_expires_at",
55
+ "type": "timestamp",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "refresh_token_expires_at": {
60
+ "name": "refresh_token_expires_at",
61
+ "type": "timestamp",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "scope": {
66
+ "name": "scope",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "password": {
72
+ "name": "password",
73
+ "type": "text",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp",
80
+ "primaryKey": false,
81
+ "notNull": true
82
+ },
83
+ "updated_at": {
84
+ "name": "updated_at",
85
+ "type": "timestamp",
86
+ "primaryKey": false,
87
+ "notNull": true
88
+ }
89
+ },
90
+ "indexes": {},
91
+ "foreignKeys": {
92
+ "account_user_id_user_id_fk": {
93
+ "name": "account_user_id_user_id_fk",
94
+ "tableFrom": "account",
95
+ "tableTo": "user",
96
+ "columnsFrom": [
97
+ "user_id"
98
+ ],
99
+ "columnsTo": [
100
+ "id"
101
+ ],
102
+ "onDelete": "no action",
103
+ "onUpdate": "no action"
104
+ }
105
+ },
106
+ "compositePrimaryKeys": {},
107
+ "uniqueConstraints": {},
108
+ "policies": {},
109
+ "checkConstraints": {},
110
+ "isRLSEnabled": false
111
+ },
112
+ "public.application": {
113
+ "name": "application",
114
+ "schema": "",
115
+ "columns": {
116
+ "id": {
117
+ "name": "id",
118
+ "type": "text",
119
+ "primaryKey": true,
120
+ "notNull": true
121
+ },
122
+ "name": {
123
+ "name": "name",
124
+ "type": "text",
125
+ "primaryKey": false,
126
+ "notNull": true
127
+ },
128
+ "description": {
129
+ "name": "description",
130
+ "type": "text",
131
+ "primaryKey": false,
132
+ "notNull": false
133
+ },
134
+ "secret_hash": {
135
+ "name": "secret_hash",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true
139
+ },
140
+ "created_by_id": {
141
+ "name": "created_by_id",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true
145
+ },
146
+ "created_at": {
147
+ "name": "created_at",
148
+ "type": "timestamp",
149
+ "primaryKey": false,
150
+ "notNull": true,
151
+ "default": "now()"
152
+ },
153
+ "updated_at": {
154
+ "name": "updated_at",
155
+ "type": "timestamp",
156
+ "primaryKey": false,
157
+ "notNull": true,
158
+ "default": "now()"
159
+ },
160
+ "last_used_at": {
161
+ "name": "last_used_at",
162
+ "type": "timestamp",
163
+ "primaryKey": false,
164
+ "notNull": false
165
+ }
166
+ },
167
+ "indexes": {},
168
+ "foreignKeys": {
169
+ "application_created_by_id_user_id_fk": {
170
+ "name": "application_created_by_id_user_id_fk",
171
+ "tableFrom": "application",
172
+ "tableTo": "user",
173
+ "columnsFrom": [
174
+ "created_by_id"
175
+ ],
176
+ "columnsTo": [
177
+ "id"
178
+ ],
179
+ "onDelete": "no action",
180
+ "onUpdate": "no action"
181
+ }
182
+ },
183
+ "compositePrimaryKeys": {},
184
+ "uniqueConstraints": {},
185
+ "policies": {},
186
+ "checkConstraints": {},
187
+ "isRLSEnabled": false
188
+ },
189
+ "public.application_role": {
190
+ "name": "application_role",
191
+ "schema": "",
192
+ "columns": {
193
+ "application_id": {
194
+ "name": "application_id",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": true
198
+ },
199
+ "role_id": {
200
+ "name": "role_id",
201
+ "type": "text",
202
+ "primaryKey": false,
203
+ "notNull": true
204
+ }
205
+ },
206
+ "indexes": {},
207
+ "foreignKeys": {
208
+ "application_role_application_id_application_id_fk": {
209
+ "name": "application_role_application_id_application_id_fk",
210
+ "tableFrom": "application_role",
211
+ "tableTo": "application",
212
+ "columnsFrom": [
213
+ "application_id"
214
+ ],
215
+ "columnsTo": [
216
+ "id"
217
+ ],
218
+ "onDelete": "cascade",
219
+ "onUpdate": "no action"
220
+ },
221
+ "application_role_role_id_role_id_fk": {
222
+ "name": "application_role_role_id_role_id_fk",
223
+ "tableFrom": "application_role",
224
+ "tableTo": "role",
225
+ "columnsFrom": [
226
+ "role_id"
227
+ ],
228
+ "columnsTo": [
229
+ "id"
230
+ ],
231
+ "onDelete": "no action",
232
+ "onUpdate": "no action"
233
+ }
234
+ },
235
+ "compositePrimaryKeys": {
236
+ "application_role_application_id_role_id_pk": {
237
+ "name": "application_role_application_id_role_id_pk",
238
+ "columns": [
239
+ "application_id",
240
+ "role_id"
241
+ ]
242
+ }
243
+ },
244
+ "uniqueConstraints": {},
245
+ "policies": {},
246
+ "checkConstraints": {},
247
+ "isRLSEnabled": false
248
+ },
249
+ "public.disabled_default_permission": {
250
+ "name": "disabled_default_permission",
251
+ "schema": "",
252
+ "columns": {
253
+ "permission_id": {
254
+ "name": "permission_id",
255
+ "type": "text",
256
+ "primaryKey": true,
257
+ "notNull": true
258
+ },
259
+ "disabled_at": {
260
+ "name": "disabled_at",
261
+ "type": "timestamp",
262
+ "primaryKey": false,
263
+ "notNull": true
264
+ }
265
+ },
266
+ "indexes": {},
267
+ "foreignKeys": {
268
+ "disabled_default_permission_permission_id_permission_id_fk": {
269
+ "name": "disabled_default_permission_permission_id_permission_id_fk",
270
+ "tableFrom": "disabled_default_permission",
271
+ "tableTo": "permission",
272
+ "columnsFrom": [
273
+ "permission_id"
274
+ ],
275
+ "columnsTo": [
276
+ "id"
277
+ ],
278
+ "onDelete": "no action",
279
+ "onUpdate": "no action"
280
+ }
281
+ },
282
+ "compositePrimaryKeys": {},
283
+ "uniqueConstraints": {},
284
+ "policies": {},
285
+ "checkConstraints": {},
286
+ "isRLSEnabled": false
287
+ },
288
+ "public.disabled_public_default_permission": {
289
+ "name": "disabled_public_default_permission",
290
+ "schema": "",
291
+ "columns": {
292
+ "permission_id": {
293
+ "name": "permission_id",
294
+ "type": "text",
295
+ "primaryKey": true,
296
+ "notNull": true
297
+ },
298
+ "disabled_at": {
299
+ "name": "disabled_at",
300
+ "type": "timestamp",
301
+ "primaryKey": false,
302
+ "notNull": true
303
+ }
304
+ },
305
+ "indexes": {},
306
+ "foreignKeys": {
307
+ "disabled_public_default_permission_permission_id_permission_id_fk": {
308
+ "name": "disabled_public_default_permission_permission_id_permission_id_fk",
309
+ "tableFrom": "disabled_public_default_permission",
310
+ "tableTo": "permission",
311
+ "columnsFrom": [
312
+ "permission_id"
313
+ ],
314
+ "columnsTo": [
315
+ "id"
316
+ ],
317
+ "onDelete": "no action",
318
+ "onUpdate": "no action"
319
+ }
320
+ },
321
+ "compositePrimaryKeys": {},
322
+ "uniqueConstraints": {},
323
+ "policies": {},
324
+ "checkConstraints": {},
325
+ "isRLSEnabled": false
326
+ },
327
+ "public.permission": {
328
+ "name": "permission",
329
+ "schema": "",
330
+ "columns": {
331
+ "id": {
332
+ "name": "id",
333
+ "type": "text",
334
+ "primaryKey": true,
335
+ "notNull": true
336
+ },
337
+ "description": {
338
+ "name": "description",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": false
342
+ }
343
+ },
344
+ "indexes": {},
345
+ "foreignKeys": {},
346
+ "compositePrimaryKeys": {},
347
+ "uniqueConstraints": {},
348
+ "policies": {},
349
+ "checkConstraints": {},
350
+ "isRLSEnabled": false
351
+ },
352
+ "public.role": {
353
+ "name": "role",
354
+ "schema": "",
355
+ "columns": {
356
+ "id": {
357
+ "name": "id",
358
+ "type": "text",
359
+ "primaryKey": true,
360
+ "notNull": true
361
+ },
362
+ "name": {
363
+ "name": "name",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": true
367
+ },
368
+ "description": {
369
+ "name": "description",
370
+ "type": "text",
371
+ "primaryKey": false,
372
+ "notNull": false
373
+ },
374
+ "is_system": {
375
+ "name": "is_system",
376
+ "type": "boolean",
377
+ "primaryKey": false,
378
+ "notNull": false,
379
+ "default": false
380
+ }
381
+ },
382
+ "indexes": {},
383
+ "foreignKeys": {},
384
+ "compositePrimaryKeys": {},
385
+ "uniqueConstraints": {},
386
+ "policies": {},
387
+ "checkConstraints": {},
388
+ "isRLSEnabled": false
389
+ },
390
+ "public.role_permission": {
391
+ "name": "role_permission",
392
+ "schema": "",
393
+ "columns": {
394
+ "role_id": {
395
+ "name": "role_id",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true
399
+ },
400
+ "permission_id": {
401
+ "name": "permission_id",
402
+ "type": "text",
403
+ "primaryKey": false,
404
+ "notNull": true
405
+ }
406
+ },
407
+ "indexes": {},
408
+ "foreignKeys": {
409
+ "role_permission_role_id_role_id_fk": {
410
+ "name": "role_permission_role_id_role_id_fk",
411
+ "tableFrom": "role_permission",
412
+ "tableTo": "role",
413
+ "columnsFrom": [
414
+ "role_id"
415
+ ],
416
+ "columnsTo": [
417
+ "id"
418
+ ],
419
+ "onDelete": "no action",
420
+ "onUpdate": "no action"
421
+ },
422
+ "role_permission_permission_id_permission_id_fk": {
423
+ "name": "role_permission_permission_id_permission_id_fk",
424
+ "tableFrom": "role_permission",
425
+ "tableTo": "permission",
426
+ "columnsFrom": [
427
+ "permission_id"
428
+ ],
429
+ "columnsTo": [
430
+ "id"
431
+ ],
432
+ "onDelete": "no action",
433
+ "onUpdate": "no action"
434
+ }
435
+ },
436
+ "compositePrimaryKeys": {
437
+ "role_permission_role_id_permission_id_pk": {
438
+ "name": "role_permission_role_id_permission_id_pk",
439
+ "columns": [
440
+ "role_id",
441
+ "permission_id"
442
+ ]
443
+ }
444
+ },
445
+ "uniqueConstraints": {},
446
+ "policies": {},
447
+ "checkConstraints": {},
448
+ "isRLSEnabled": false
449
+ },
450
+ "public.session": {
451
+ "name": "session",
452
+ "schema": "",
453
+ "columns": {
454
+ "id": {
455
+ "name": "id",
456
+ "type": "text",
457
+ "primaryKey": true,
458
+ "notNull": true
459
+ },
460
+ "expires_at": {
461
+ "name": "expires_at",
462
+ "type": "timestamp",
463
+ "primaryKey": false,
464
+ "notNull": true
465
+ },
466
+ "token": {
467
+ "name": "token",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true
471
+ },
472
+ "created_at": {
473
+ "name": "created_at",
474
+ "type": "timestamp",
475
+ "primaryKey": false,
476
+ "notNull": true
477
+ },
478
+ "updated_at": {
479
+ "name": "updated_at",
480
+ "type": "timestamp",
481
+ "primaryKey": false,
482
+ "notNull": true
483
+ },
484
+ "ip_address": {
485
+ "name": "ip_address",
486
+ "type": "text",
487
+ "primaryKey": false,
488
+ "notNull": false
489
+ },
490
+ "user_agent": {
491
+ "name": "user_agent",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": false
495
+ },
496
+ "user_id": {
497
+ "name": "user_id",
498
+ "type": "text",
499
+ "primaryKey": false,
500
+ "notNull": true
501
+ }
502
+ },
503
+ "indexes": {},
504
+ "foreignKeys": {
505
+ "session_user_id_user_id_fk": {
506
+ "name": "session_user_id_user_id_fk",
507
+ "tableFrom": "session",
508
+ "tableTo": "user",
509
+ "columnsFrom": [
510
+ "user_id"
511
+ ],
512
+ "columnsTo": [
513
+ "id"
514
+ ],
515
+ "onDelete": "no action",
516
+ "onUpdate": "no action"
517
+ }
518
+ },
519
+ "compositePrimaryKeys": {},
520
+ "uniqueConstraints": {
521
+ "session_token_unique": {
522
+ "name": "session_token_unique",
523
+ "nullsNotDistinct": false,
524
+ "columns": [
525
+ "token"
526
+ ]
527
+ }
528
+ },
529
+ "policies": {},
530
+ "checkConstraints": {},
531
+ "isRLSEnabled": false
532
+ },
533
+ "public.user": {
534
+ "name": "user",
535
+ "schema": "",
536
+ "columns": {
537
+ "id": {
538
+ "name": "id",
539
+ "type": "text",
540
+ "primaryKey": true,
541
+ "notNull": true
542
+ },
543
+ "name": {
544
+ "name": "name",
545
+ "type": "text",
546
+ "primaryKey": false,
547
+ "notNull": true
548
+ },
549
+ "email": {
550
+ "name": "email",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": true
554
+ },
555
+ "email_verified": {
556
+ "name": "email_verified",
557
+ "type": "boolean",
558
+ "primaryKey": false,
559
+ "notNull": true
560
+ },
561
+ "image": {
562
+ "name": "image",
563
+ "type": "text",
564
+ "primaryKey": false,
565
+ "notNull": false
566
+ },
567
+ "created_at": {
568
+ "name": "created_at",
569
+ "type": "timestamp",
570
+ "primaryKey": false,
571
+ "notNull": true
572
+ },
573
+ "updated_at": {
574
+ "name": "updated_at",
575
+ "type": "timestamp",
576
+ "primaryKey": false,
577
+ "notNull": true
578
+ }
579
+ },
580
+ "indexes": {},
581
+ "foreignKeys": {},
582
+ "compositePrimaryKeys": {},
583
+ "uniqueConstraints": {
584
+ "user_email_unique": {
585
+ "name": "user_email_unique",
586
+ "nullsNotDistinct": false,
587
+ "columns": [
588
+ "email"
589
+ ]
590
+ }
591
+ },
592
+ "policies": {},
593
+ "checkConstraints": {},
594
+ "isRLSEnabled": false
595
+ },
596
+ "public.user_role": {
597
+ "name": "user_role",
598
+ "schema": "",
599
+ "columns": {
600
+ "user_id": {
601
+ "name": "user_id",
602
+ "type": "text",
603
+ "primaryKey": false,
604
+ "notNull": true
605
+ },
606
+ "role_id": {
607
+ "name": "role_id",
608
+ "type": "text",
609
+ "primaryKey": false,
610
+ "notNull": true
611
+ }
612
+ },
613
+ "indexes": {},
614
+ "foreignKeys": {
615
+ "user_role_user_id_user_id_fk": {
616
+ "name": "user_role_user_id_user_id_fk",
617
+ "tableFrom": "user_role",
618
+ "tableTo": "user",
619
+ "columnsFrom": [
620
+ "user_id"
621
+ ],
622
+ "columnsTo": [
623
+ "id"
624
+ ],
625
+ "onDelete": "no action",
626
+ "onUpdate": "no action"
627
+ },
628
+ "user_role_role_id_role_id_fk": {
629
+ "name": "user_role_role_id_role_id_fk",
630
+ "tableFrom": "user_role",
631
+ "tableTo": "role",
632
+ "columnsFrom": [
633
+ "role_id"
634
+ ],
635
+ "columnsTo": [
636
+ "id"
637
+ ],
638
+ "onDelete": "no action",
639
+ "onUpdate": "no action"
640
+ }
641
+ },
642
+ "compositePrimaryKeys": {
643
+ "user_role_user_id_role_id_pk": {
644
+ "name": "user_role_user_id_role_id_pk",
645
+ "columns": [
646
+ "user_id",
647
+ "role_id"
648
+ ]
649
+ }
650
+ },
651
+ "uniqueConstraints": {},
652
+ "policies": {},
653
+ "checkConstraints": {},
654
+ "isRLSEnabled": false
655
+ },
656
+ "public.verification": {
657
+ "name": "verification",
658
+ "schema": "",
659
+ "columns": {
660
+ "id": {
661
+ "name": "id",
662
+ "type": "text",
663
+ "primaryKey": true,
664
+ "notNull": true
665
+ },
666
+ "identifier": {
667
+ "name": "identifier",
668
+ "type": "text",
669
+ "primaryKey": false,
670
+ "notNull": true
671
+ },
672
+ "value": {
673
+ "name": "value",
674
+ "type": "text",
675
+ "primaryKey": false,
676
+ "notNull": true
677
+ },
678
+ "expires_at": {
679
+ "name": "expires_at",
680
+ "type": "timestamp",
681
+ "primaryKey": false,
682
+ "notNull": true
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
+ },
697
+ "indexes": {},
698
+ "foreignKeys": {},
699
+ "compositePrimaryKeys": {},
700
+ "uniqueConstraints": {},
701
+ "policies": {},
702
+ "checkConstraints": {},
703
+ "isRLSEnabled": false
704
+ }
705
+ },
706
+ "enums": {},
707
+ "schemas": {},
708
+ "sequences": {},
709
+ "roles": {},
710
+ "policies": {},
711
+ "views": {},
712
+ "_meta": {
713
+ "columns": {},
714
+ "schemas": {},
715
+ "tables": {}
716
+ }
717
+ }