@authhero/drizzle 0.44.4 → 0.45.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.
- package/dist/drizzle-adapter.cjs +3 -3
- package/dist/drizzle-adapter.mjs +1810 -1690
- package/drizzle/{0000_watery_loners.sql → 0000_sloppy_forge.sql} +37 -18
- package/drizzle/meta/0000_snapshot.json +745 -125
- package/drizzle/meta/_journal.json +3 -3
- package/package.json +2 -2
- package/src/schema/sqlite/branding.ts +27 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "6",
|
|
3
3
|
"dialect": "sqlite",
|
|
4
|
-
"id": "
|
|
4
|
+
"id": "b62af96d-7493-4eed-91f6-25a87cd6c9f3",
|
|
5
5
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
6
|
"tables": {
|
|
7
7
|
"tenants": {
|
|
@@ -390,8 +390,12 @@
|
|
|
390
390
|
"name": "passwords_tenant_id_tenants_id_fk",
|
|
391
391
|
"tableFrom": "passwords",
|
|
392
392
|
"tableTo": "tenants",
|
|
393
|
-
"columnsFrom": [
|
|
394
|
-
|
|
393
|
+
"columnsFrom": [
|
|
394
|
+
"tenant_id"
|
|
395
|
+
],
|
|
396
|
+
"columnsTo": [
|
|
397
|
+
"id"
|
|
398
|
+
],
|
|
395
399
|
"onDelete": "cascade",
|
|
396
400
|
"onUpdate": "no action"
|
|
397
401
|
}
|
|
@@ -654,37 +658,59 @@
|
|
|
654
658
|
"indexes": {
|
|
655
659
|
"unique_email_provider": {
|
|
656
660
|
"name": "unique_email_provider",
|
|
657
|
-
"columns": [
|
|
661
|
+
"columns": [
|
|
662
|
+
"email",
|
|
663
|
+
"provider",
|
|
664
|
+
"tenant_id"
|
|
665
|
+
],
|
|
658
666
|
"isUnique": true
|
|
659
667
|
},
|
|
660
668
|
"unique_phone_provider": {
|
|
661
669
|
"name": "unique_phone_provider",
|
|
662
|
-
"columns": [
|
|
670
|
+
"columns": [
|
|
671
|
+
"phone_number",
|
|
672
|
+
"provider",
|
|
673
|
+
"tenant_id"
|
|
674
|
+
],
|
|
663
675
|
"isUnique": true
|
|
664
676
|
},
|
|
665
677
|
"unique_username_provider": {
|
|
666
678
|
"name": "unique_username_provider",
|
|
667
|
-
"columns": [
|
|
679
|
+
"columns": [
|
|
680
|
+
"username",
|
|
681
|
+
"provider",
|
|
682
|
+
"tenant_id"
|
|
683
|
+
],
|
|
668
684
|
"isUnique": true
|
|
669
685
|
},
|
|
670
686
|
"users_email_index": {
|
|
671
687
|
"name": "users_email_index",
|
|
672
|
-
"columns": [
|
|
688
|
+
"columns": [
|
|
689
|
+
"email"
|
|
690
|
+
],
|
|
673
691
|
"isUnique": false
|
|
674
692
|
},
|
|
675
693
|
"users_linked_to_index": {
|
|
676
694
|
"name": "users_linked_to_index",
|
|
677
|
-
"columns": [
|
|
695
|
+
"columns": [
|
|
696
|
+
"linked_to"
|
|
697
|
+
],
|
|
678
698
|
"isUnique": false
|
|
679
699
|
},
|
|
680
700
|
"users_name_index": {
|
|
681
701
|
"name": "users_name_index",
|
|
682
|
-
"columns": [
|
|
702
|
+
"columns": [
|
|
703
|
+
"name"
|
|
704
|
+
],
|
|
683
705
|
"isUnique": false
|
|
684
706
|
},
|
|
685
707
|
"users_phone_tenant_provider_index": {
|
|
686
708
|
"name": "users_phone_tenant_provider_index",
|
|
687
|
-
"columns": [
|
|
709
|
+
"columns": [
|
|
710
|
+
"tenant_id",
|
|
711
|
+
"phone_number",
|
|
712
|
+
"provider"
|
|
713
|
+
],
|
|
688
714
|
"isUnique": false
|
|
689
715
|
}
|
|
690
716
|
},
|
|
@@ -693,15 +719,22 @@
|
|
|
693
719
|
"name": "users_tenant_id_tenants_id_fk",
|
|
694
720
|
"tableFrom": "users",
|
|
695
721
|
"tableTo": "tenants",
|
|
696
|
-
"columnsFrom": [
|
|
697
|
-
|
|
722
|
+
"columnsFrom": [
|
|
723
|
+
"tenant_id"
|
|
724
|
+
],
|
|
725
|
+
"columnsTo": [
|
|
726
|
+
"id"
|
|
727
|
+
],
|
|
698
728
|
"onDelete": "cascade",
|
|
699
729
|
"onUpdate": "no action"
|
|
700
730
|
}
|
|
701
731
|
},
|
|
702
732
|
"compositePrimaryKeys": {
|
|
703
733
|
"users_tenants": {
|
|
704
|
-
"columns": [
|
|
734
|
+
"columns": [
|
|
735
|
+
"user_id",
|
|
736
|
+
"tenant_id"
|
|
737
|
+
],
|
|
705
738
|
"name": "users_tenants"
|
|
706
739
|
}
|
|
707
740
|
},
|
|
@@ -809,8 +842,12 @@
|
|
|
809
842
|
"name": "authentication_codes_tenant_id_tenants_id_fk",
|
|
810
843
|
"tableFrom": "authentication_codes",
|
|
811
844
|
"tableTo": "tenants",
|
|
812
|
-
"columnsFrom": [
|
|
813
|
-
|
|
845
|
+
"columnsFrom": [
|
|
846
|
+
"tenant_id"
|
|
847
|
+
],
|
|
848
|
+
"columnsTo": [
|
|
849
|
+
"id"
|
|
850
|
+
],
|
|
814
851
|
"onDelete": "cascade",
|
|
815
852
|
"onUpdate": "no action"
|
|
816
853
|
}
|
|
@@ -931,7 +968,9 @@
|
|
|
931
968
|
"indexes": {
|
|
932
969
|
"codes_expires_at_index": {
|
|
933
970
|
"name": "codes_expires_at_index",
|
|
934
|
-
"columns": [
|
|
971
|
+
"columns": [
|
|
972
|
+
"expires_at"
|
|
973
|
+
],
|
|
935
974
|
"isUnique": false
|
|
936
975
|
}
|
|
937
976
|
},
|
|
@@ -940,15 +979,22 @@
|
|
|
940
979
|
"name": "codes_tenant_id_tenants_id_fk",
|
|
941
980
|
"tableFrom": "codes",
|
|
942
981
|
"tableTo": "tenants",
|
|
943
|
-
"columnsFrom": [
|
|
944
|
-
|
|
982
|
+
"columnsFrom": [
|
|
983
|
+
"tenant_id"
|
|
984
|
+
],
|
|
985
|
+
"columnsTo": [
|
|
986
|
+
"id"
|
|
987
|
+
],
|
|
945
988
|
"onDelete": "cascade",
|
|
946
989
|
"onUpdate": "no action"
|
|
947
990
|
}
|
|
948
991
|
},
|
|
949
992
|
"compositePrimaryKeys": {
|
|
950
993
|
"PK_codes_code_id_code_type": {
|
|
951
|
-
"columns": [
|
|
994
|
+
"columns": [
|
|
995
|
+
"code_id",
|
|
996
|
+
"code_type"
|
|
997
|
+
],
|
|
952
998
|
"name": "PK_codes_code_id_code_type"
|
|
953
999
|
}
|
|
954
1000
|
},
|
|
@@ -1103,27 +1149,39 @@
|
|
|
1103
1149
|
"indexes": {
|
|
1104
1150
|
"login_sessions_id_index": {
|
|
1105
1151
|
"name": "login_sessions_id_index",
|
|
1106
|
-
"columns": [
|
|
1152
|
+
"columns": [
|
|
1153
|
+
"id"
|
|
1154
|
+
],
|
|
1107
1155
|
"isUnique": false
|
|
1108
1156
|
},
|
|
1109
1157
|
"login_sessions_state_idx": {
|
|
1110
1158
|
"name": "login_sessions_state_idx",
|
|
1111
|
-
"columns": [
|
|
1159
|
+
"columns": [
|
|
1160
|
+
"state"
|
|
1161
|
+
],
|
|
1112
1162
|
"isUnique": false
|
|
1113
1163
|
},
|
|
1114
1164
|
"login_sessions_state_updated_idx": {
|
|
1115
1165
|
"name": "login_sessions_state_updated_idx",
|
|
1116
|
-
"columns": [
|
|
1166
|
+
"columns": [
|
|
1167
|
+
"state",
|
|
1168
|
+
"updated_at_ts"
|
|
1169
|
+
],
|
|
1117
1170
|
"isUnique": false
|
|
1118
1171
|
},
|
|
1119
1172
|
"login_sessions_tenant_user_idx": {
|
|
1120
1173
|
"name": "login_sessions_tenant_user_idx",
|
|
1121
|
-
"columns": [
|
|
1174
|
+
"columns": [
|
|
1175
|
+
"tenant_id",
|
|
1176
|
+
"user_id"
|
|
1177
|
+
],
|
|
1122
1178
|
"isUnique": false
|
|
1123
1179
|
},
|
|
1124
1180
|
"idx_login_sessions_expires_at_ts": {
|
|
1125
1181
|
"name": "idx_login_sessions_expires_at_ts",
|
|
1126
|
-
"columns": [
|
|
1182
|
+
"columns": [
|
|
1183
|
+
"expires_at_ts"
|
|
1184
|
+
],
|
|
1127
1185
|
"isUnique": false
|
|
1128
1186
|
}
|
|
1129
1187
|
},
|
|
@@ -1132,15 +1190,22 @@
|
|
|
1132
1190
|
"name": "login_sessions_tenant_id_tenants_id_fk",
|
|
1133
1191
|
"tableFrom": "login_sessions",
|
|
1134
1192
|
"tableTo": "tenants",
|
|
1135
|
-
"columnsFrom": [
|
|
1136
|
-
|
|
1193
|
+
"columnsFrom": [
|
|
1194
|
+
"tenant_id"
|
|
1195
|
+
],
|
|
1196
|
+
"columnsTo": [
|
|
1197
|
+
"id"
|
|
1198
|
+
],
|
|
1137
1199
|
"onDelete": "cascade",
|
|
1138
1200
|
"onUpdate": "no action"
|
|
1139
1201
|
}
|
|
1140
1202
|
},
|
|
1141
1203
|
"compositePrimaryKeys": {
|
|
1142
1204
|
"login_sessions_pk": {
|
|
1143
|
-
"columns": [
|
|
1205
|
+
"columns": [
|
|
1206
|
+
"tenant_id",
|
|
1207
|
+
"id"
|
|
1208
|
+
],
|
|
1144
1209
|
"name": "login_sessions_pk"
|
|
1145
1210
|
}
|
|
1146
1211
|
},
|
|
@@ -1280,12 +1345,16 @@
|
|
|
1280
1345
|
"indexes": {
|
|
1281
1346
|
"otps_email_index": {
|
|
1282
1347
|
"name": "otps_email_index",
|
|
1283
|
-
"columns": [
|
|
1348
|
+
"columns": [
|
|
1349
|
+
"email"
|
|
1350
|
+
],
|
|
1284
1351
|
"isUnique": false
|
|
1285
1352
|
},
|
|
1286
1353
|
"otps_expires_at_index": {
|
|
1287
1354
|
"name": "otps_expires_at_index",
|
|
1288
|
-
"columns": [
|
|
1355
|
+
"columns": [
|
|
1356
|
+
"expires_at"
|
|
1357
|
+
],
|
|
1289
1358
|
"isUnique": false
|
|
1290
1359
|
}
|
|
1291
1360
|
},
|
|
@@ -1294,8 +1363,12 @@
|
|
|
1294
1363
|
"name": "otps_tenant_id_tenants_id_fk",
|
|
1295
1364
|
"tableFrom": "otps",
|
|
1296
1365
|
"tableTo": "tenants",
|
|
1297
|
-
"columnsFrom": [
|
|
1298
|
-
|
|
1366
|
+
"columnsFrom": [
|
|
1367
|
+
"tenant_id"
|
|
1368
|
+
],
|
|
1369
|
+
"columnsTo": [
|
|
1370
|
+
"id"
|
|
1371
|
+
],
|
|
1299
1372
|
"onDelete": "cascade",
|
|
1300
1373
|
"onUpdate": "no action"
|
|
1301
1374
|
}
|
|
@@ -1309,7 +1382,7 @@
|
|
|
1309
1382
|
"columns": {
|
|
1310
1383
|
"id": {
|
|
1311
1384
|
"name": "id",
|
|
1312
|
-
"type": "text(
|
|
1385
|
+
"type": "text(26)",
|
|
1313
1386
|
"primaryKey": false,
|
|
1314
1387
|
"notNull": true,
|
|
1315
1388
|
"autoincrement": false
|
|
@@ -1330,7 +1403,7 @@
|
|
|
1330
1403
|
},
|
|
1331
1404
|
"login_id": {
|
|
1332
1405
|
"name": "login_id",
|
|
1333
|
-
"type": "text(
|
|
1406
|
+
"type": "text(26)",
|
|
1334
1407
|
"primaryKey": false,
|
|
1335
1408
|
"notNull": true,
|
|
1336
1409
|
"autoincrement": false
|
|
@@ -1363,6 +1436,41 @@
|
|
|
1363
1436
|
"notNull": true,
|
|
1364
1437
|
"autoincrement": false
|
|
1365
1438
|
},
|
|
1439
|
+
"token_lookup": {
|
|
1440
|
+
"name": "token_lookup",
|
|
1441
|
+
"type": "text(16)",
|
|
1442
|
+
"primaryKey": false,
|
|
1443
|
+
"notNull": false,
|
|
1444
|
+
"autoincrement": false
|
|
1445
|
+
},
|
|
1446
|
+
"token_hash": {
|
|
1447
|
+
"name": "token_hash",
|
|
1448
|
+
"type": "text(64)",
|
|
1449
|
+
"primaryKey": false,
|
|
1450
|
+
"notNull": false,
|
|
1451
|
+
"autoincrement": false
|
|
1452
|
+
},
|
|
1453
|
+
"family_id": {
|
|
1454
|
+
"name": "family_id",
|
|
1455
|
+
"type": "text(26)",
|
|
1456
|
+
"primaryKey": false,
|
|
1457
|
+
"notNull": false,
|
|
1458
|
+
"autoincrement": false
|
|
1459
|
+
},
|
|
1460
|
+
"rotated_to": {
|
|
1461
|
+
"name": "rotated_to",
|
|
1462
|
+
"type": "text(26)",
|
|
1463
|
+
"primaryKey": false,
|
|
1464
|
+
"notNull": false,
|
|
1465
|
+
"autoincrement": false
|
|
1466
|
+
},
|
|
1467
|
+
"rotated_at_ts": {
|
|
1468
|
+
"name": "rotated_at_ts",
|
|
1469
|
+
"type": "integer",
|
|
1470
|
+
"primaryKey": false,
|
|
1471
|
+
"notNull": false,
|
|
1472
|
+
"autoincrement": false
|
|
1473
|
+
},
|
|
1366
1474
|
"created_at_ts": {
|
|
1367
1475
|
"name": "created_at_ts",
|
|
1368
1476
|
"type": "integer",
|
|
@@ -1402,17 +1510,40 @@
|
|
|
1402
1510
|
"indexes": {
|
|
1403
1511
|
"idx_refresh_tokens_user_id": {
|
|
1404
1512
|
"name": "idx_refresh_tokens_user_id",
|
|
1405
|
-
"columns": [
|
|
1513
|
+
"columns": [
|
|
1514
|
+
"tenant_id",
|
|
1515
|
+
"user_id"
|
|
1516
|
+
],
|
|
1406
1517
|
"isUnique": false
|
|
1407
1518
|
},
|
|
1408
1519
|
"idx_refresh_tokens_login_id": {
|
|
1409
1520
|
"name": "idx_refresh_tokens_login_id",
|
|
1410
|
-
"columns": [
|
|
1521
|
+
"columns": [
|
|
1522
|
+
"login_id"
|
|
1523
|
+
],
|
|
1411
1524
|
"isUnique": false
|
|
1412
1525
|
},
|
|
1413
1526
|
"idx_refresh_tokens_expires_at_ts": {
|
|
1414
1527
|
"name": "idx_refresh_tokens_expires_at_ts",
|
|
1415
|
-
"columns": [
|
|
1528
|
+
"columns": [
|
|
1529
|
+
"expires_at_ts"
|
|
1530
|
+
],
|
|
1531
|
+
"isUnique": false
|
|
1532
|
+
},
|
|
1533
|
+
"idx_refresh_tokens_token_lookup": {
|
|
1534
|
+
"name": "idx_refresh_tokens_token_lookup",
|
|
1535
|
+
"columns": [
|
|
1536
|
+
"tenant_id",
|
|
1537
|
+
"token_lookup"
|
|
1538
|
+
],
|
|
1539
|
+
"isUnique": false
|
|
1540
|
+
},
|
|
1541
|
+
"idx_refresh_tokens_family_id": {
|
|
1542
|
+
"name": "idx_refresh_tokens_family_id",
|
|
1543
|
+
"columns": [
|
|
1544
|
+
"tenant_id",
|
|
1545
|
+
"family_id"
|
|
1546
|
+
],
|
|
1416
1547
|
"isUnique": false
|
|
1417
1548
|
}
|
|
1418
1549
|
},
|
|
@@ -1421,15 +1552,22 @@
|
|
|
1421
1552
|
"name": "refresh_tokens_tenant_id_tenants_id_fk",
|
|
1422
1553
|
"tableFrom": "refresh_tokens",
|
|
1423
1554
|
"tableTo": "tenants",
|
|
1424
|
-
"columnsFrom": [
|
|
1425
|
-
|
|
1555
|
+
"columnsFrom": [
|
|
1556
|
+
"tenant_id"
|
|
1557
|
+
],
|
|
1558
|
+
"columnsTo": [
|
|
1559
|
+
"id"
|
|
1560
|
+
],
|
|
1426
1561
|
"onDelete": "cascade",
|
|
1427
1562
|
"onUpdate": "no action"
|
|
1428
1563
|
}
|
|
1429
1564
|
},
|
|
1430
1565
|
"compositePrimaryKeys": {
|
|
1431
1566
|
"refresh_tokens_pk": {
|
|
1432
|
-
"columns": [
|
|
1567
|
+
"columns": [
|
|
1568
|
+
"tenant_id",
|
|
1569
|
+
"id"
|
|
1570
|
+
],
|
|
1433
1571
|
"name": "refresh_tokens_pk"
|
|
1434
1572
|
}
|
|
1435
1573
|
},
|
|
@@ -1541,17 +1679,24 @@
|
|
|
1541
1679
|
"indexes": {
|
|
1542
1680
|
"IDX_sessions_login_session_id": {
|
|
1543
1681
|
"name": "IDX_sessions_login_session_id",
|
|
1544
|
-
"columns": [
|
|
1682
|
+
"columns": [
|
|
1683
|
+
"login_session_id"
|
|
1684
|
+
],
|
|
1545
1685
|
"isUnique": false
|
|
1546
1686
|
},
|
|
1547
1687
|
"idx_sessions_user_id": {
|
|
1548
1688
|
"name": "idx_sessions_user_id",
|
|
1549
|
-
"columns": [
|
|
1689
|
+
"columns": [
|
|
1690
|
+
"tenant_id",
|
|
1691
|
+
"user_id"
|
|
1692
|
+
],
|
|
1550
1693
|
"isUnique": false
|
|
1551
1694
|
},
|
|
1552
1695
|
"idx_sessions_expires_at_ts": {
|
|
1553
1696
|
"name": "idx_sessions_expires_at_ts",
|
|
1554
|
-
"columns": [
|
|
1697
|
+
"columns": [
|
|
1698
|
+
"expires_at_ts"
|
|
1699
|
+
],
|
|
1555
1700
|
"isUnique": false
|
|
1556
1701
|
}
|
|
1557
1702
|
},
|
|
@@ -1560,15 +1705,22 @@
|
|
|
1560
1705
|
"name": "sessions_tenant_id_tenants_id_fk",
|
|
1561
1706
|
"tableFrom": "sessions",
|
|
1562
1707
|
"tableTo": "tenants",
|
|
1563
|
-
"columnsFrom": [
|
|
1564
|
-
|
|
1708
|
+
"columnsFrom": [
|
|
1709
|
+
"tenant_id"
|
|
1710
|
+
],
|
|
1711
|
+
"columnsTo": [
|
|
1712
|
+
"id"
|
|
1713
|
+
],
|
|
1565
1714
|
"onDelete": "cascade",
|
|
1566
1715
|
"onUpdate": "no action"
|
|
1567
1716
|
}
|
|
1568
1717
|
},
|
|
1569
1718
|
"compositePrimaryKeys": {
|
|
1570
1719
|
"sessions_pk": {
|
|
1571
|
-
"columns": [
|
|
1720
|
+
"columns": [
|
|
1721
|
+
"tenant_id",
|
|
1722
|
+
"id"
|
|
1723
|
+
],
|
|
1572
1724
|
"name": "sessions_pk"
|
|
1573
1725
|
}
|
|
1574
1726
|
},
|
|
@@ -1676,8 +1828,12 @@
|
|
|
1676
1828
|
"name": "tickets_tenant_id_tenants_id_fk",
|
|
1677
1829
|
"tableFrom": "tickets",
|
|
1678
1830
|
"tableTo": "tenants",
|
|
1679
|
-
"columnsFrom": [
|
|
1680
|
-
|
|
1831
|
+
"columnsFrom": [
|
|
1832
|
+
"tenant_id"
|
|
1833
|
+
],
|
|
1834
|
+
"columnsTo": [
|
|
1835
|
+
"id"
|
|
1836
|
+
],
|
|
1681
1837
|
"onDelete": "cascade",
|
|
1682
1838
|
"onUpdate": "no action"
|
|
1683
1839
|
}
|
|
@@ -1781,7 +1937,9 @@
|
|
|
1781
1937
|
"indexes": {
|
|
1782
1938
|
"idx_client_grants_audience": {
|
|
1783
1939
|
"name": "idx_client_grants_audience",
|
|
1784
|
-
"columns": [
|
|
1940
|
+
"columns": [
|
|
1941
|
+
"audience"
|
|
1942
|
+
],
|
|
1785
1943
|
"isUnique": false
|
|
1786
1944
|
}
|
|
1787
1945
|
},
|
|
@@ -1790,21 +1948,154 @@
|
|
|
1790
1948
|
"name": "client_grants_tenant_id_tenants_id_fk",
|
|
1791
1949
|
"tableFrom": "client_grants",
|
|
1792
1950
|
"tableTo": "tenants",
|
|
1793
|
-
"columnsFrom": [
|
|
1794
|
-
|
|
1951
|
+
"columnsFrom": [
|
|
1952
|
+
"tenant_id"
|
|
1953
|
+
],
|
|
1954
|
+
"columnsTo": [
|
|
1955
|
+
"id"
|
|
1956
|
+
],
|
|
1795
1957
|
"onDelete": "cascade",
|
|
1796
1958
|
"onUpdate": "no action"
|
|
1797
1959
|
}
|
|
1798
1960
|
},
|
|
1799
1961
|
"compositePrimaryKeys": {
|
|
1800
1962
|
"pk_client_grants": {
|
|
1801
|
-
"columns": [
|
|
1963
|
+
"columns": [
|
|
1964
|
+
"tenant_id",
|
|
1965
|
+
"id"
|
|
1966
|
+
],
|
|
1802
1967
|
"name": "pk_client_grants"
|
|
1803
1968
|
}
|
|
1804
1969
|
},
|
|
1805
1970
|
"uniqueConstraints": {},
|
|
1806
1971
|
"checkConstraints": {}
|
|
1807
1972
|
},
|
|
1973
|
+
"client_registration_tokens": {
|
|
1974
|
+
"name": "client_registration_tokens",
|
|
1975
|
+
"columns": {
|
|
1976
|
+
"id": {
|
|
1977
|
+
"name": "id",
|
|
1978
|
+
"type": "text(255)",
|
|
1979
|
+
"primaryKey": true,
|
|
1980
|
+
"notNull": true,
|
|
1981
|
+
"autoincrement": false
|
|
1982
|
+
},
|
|
1983
|
+
"tenant_id": {
|
|
1984
|
+
"name": "tenant_id",
|
|
1985
|
+
"type": "text(191)",
|
|
1986
|
+
"primaryKey": false,
|
|
1987
|
+
"notNull": true,
|
|
1988
|
+
"autoincrement": false
|
|
1989
|
+
},
|
|
1990
|
+
"token_hash": {
|
|
1991
|
+
"name": "token_hash",
|
|
1992
|
+
"type": "text(64)",
|
|
1993
|
+
"primaryKey": false,
|
|
1994
|
+
"notNull": true,
|
|
1995
|
+
"autoincrement": false
|
|
1996
|
+
},
|
|
1997
|
+
"type": {
|
|
1998
|
+
"name": "type",
|
|
1999
|
+
"type": "text(8)",
|
|
2000
|
+
"primaryKey": false,
|
|
2001
|
+
"notNull": true,
|
|
2002
|
+
"autoincrement": false
|
|
2003
|
+
},
|
|
2004
|
+
"client_id": {
|
|
2005
|
+
"name": "client_id",
|
|
2006
|
+
"type": "text(191)",
|
|
2007
|
+
"primaryKey": false,
|
|
2008
|
+
"notNull": false,
|
|
2009
|
+
"autoincrement": false
|
|
2010
|
+
},
|
|
2011
|
+
"sub": {
|
|
2012
|
+
"name": "sub",
|
|
2013
|
+
"type": "text(255)",
|
|
2014
|
+
"primaryKey": false,
|
|
2015
|
+
"notNull": false,
|
|
2016
|
+
"autoincrement": false
|
|
2017
|
+
},
|
|
2018
|
+
"constraints": {
|
|
2019
|
+
"name": "constraints",
|
|
2020
|
+
"type": "text",
|
|
2021
|
+
"primaryKey": false,
|
|
2022
|
+
"notNull": false,
|
|
2023
|
+
"autoincrement": false
|
|
2024
|
+
},
|
|
2025
|
+
"single_use": {
|
|
2026
|
+
"name": "single_use",
|
|
2027
|
+
"type": "integer",
|
|
2028
|
+
"primaryKey": false,
|
|
2029
|
+
"notNull": true,
|
|
2030
|
+
"autoincrement": false,
|
|
2031
|
+
"default": 0
|
|
2032
|
+
},
|
|
2033
|
+
"used_at_ts": {
|
|
2034
|
+
"name": "used_at_ts",
|
|
2035
|
+
"type": "integer",
|
|
2036
|
+
"primaryKey": false,
|
|
2037
|
+
"notNull": false,
|
|
2038
|
+
"autoincrement": false
|
|
2039
|
+
},
|
|
2040
|
+
"expires_at_ts": {
|
|
2041
|
+
"name": "expires_at_ts",
|
|
2042
|
+
"type": "integer",
|
|
2043
|
+
"primaryKey": false,
|
|
2044
|
+
"notNull": false,
|
|
2045
|
+
"autoincrement": false
|
|
2046
|
+
},
|
|
2047
|
+
"created_at_ts": {
|
|
2048
|
+
"name": "created_at_ts",
|
|
2049
|
+
"type": "integer",
|
|
2050
|
+
"primaryKey": false,
|
|
2051
|
+
"notNull": true,
|
|
2052
|
+
"autoincrement": false
|
|
2053
|
+
},
|
|
2054
|
+
"revoked_at_ts": {
|
|
2055
|
+
"name": "revoked_at_ts",
|
|
2056
|
+
"type": "integer",
|
|
2057
|
+
"primaryKey": false,
|
|
2058
|
+
"notNull": false,
|
|
2059
|
+
"autoincrement": false
|
|
2060
|
+
}
|
|
2061
|
+
},
|
|
2062
|
+
"indexes": {
|
|
2063
|
+
"idx_client_registration_tokens_hash": {
|
|
2064
|
+
"name": "idx_client_registration_tokens_hash",
|
|
2065
|
+
"columns": [
|
|
2066
|
+
"tenant_id",
|
|
2067
|
+
"token_hash"
|
|
2068
|
+
],
|
|
2069
|
+
"isUnique": true
|
|
2070
|
+
},
|
|
2071
|
+
"idx_client_registration_tokens_client": {
|
|
2072
|
+
"name": "idx_client_registration_tokens_client",
|
|
2073
|
+
"columns": [
|
|
2074
|
+
"tenant_id",
|
|
2075
|
+
"client_id"
|
|
2076
|
+
],
|
|
2077
|
+
"isUnique": false
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
"foreignKeys": {
|
|
2081
|
+
"client_registration_tokens_tenant_id_tenants_id_fk": {
|
|
2082
|
+
"name": "client_registration_tokens_tenant_id_tenants_id_fk",
|
|
2083
|
+
"tableFrom": "client_registration_tokens",
|
|
2084
|
+
"tableTo": "tenants",
|
|
2085
|
+
"columnsFrom": [
|
|
2086
|
+
"tenant_id"
|
|
2087
|
+
],
|
|
2088
|
+
"columnsTo": [
|
|
2089
|
+
"id"
|
|
2090
|
+
],
|
|
2091
|
+
"onDelete": "cascade",
|
|
2092
|
+
"onUpdate": "no action"
|
|
2093
|
+
}
|
|
2094
|
+
},
|
|
2095
|
+
"compositePrimaryKeys": {},
|
|
2096
|
+
"uniqueConstraints": {},
|
|
2097
|
+
"checkConstraints": {}
|
|
2098
|
+
},
|
|
1808
2099
|
"clients": {
|
|
1809
2100
|
"name": "clients",
|
|
1810
2101
|
"columns": {
|
|
@@ -2179,23 +2470,67 @@
|
|
|
2179
2470
|
"notNull": true,
|
|
2180
2471
|
"autoincrement": false,
|
|
2181
2472
|
"default": "'[]'"
|
|
2473
|
+
},
|
|
2474
|
+
"owner_user_id": {
|
|
2475
|
+
"name": "owner_user_id",
|
|
2476
|
+
"type": "text(255)",
|
|
2477
|
+
"primaryKey": false,
|
|
2478
|
+
"notNull": false,
|
|
2479
|
+
"autoincrement": false
|
|
2480
|
+
},
|
|
2481
|
+
"registration_type": {
|
|
2482
|
+
"name": "registration_type",
|
|
2483
|
+
"type": "text(32)",
|
|
2484
|
+
"primaryKey": false,
|
|
2485
|
+
"notNull": false,
|
|
2486
|
+
"autoincrement": false
|
|
2487
|
+
},
|
|
2488
|
+
"registration_metadata": {
|
|
2489
|
+
"name": "registration_metadata",
|
|
2490
|
+
"type": "text",
|
|
2491
|
+
"primaryKey": false,
|
|
2492
|
+
"notNull": false,
|
|
2493
|
+
"autoincrement": false
|
|
2494
|
+
},
|
|
2495
|
+
"user_linking_mode": {
|
|
2496
|
+
"name": "user_linking_mode",
|
|
2497
|
+
"type": "text(16)",
|
|
2498
|
+
"primaryKey": false,
|
|
2499
|
+
"notNull": false,
|
|
2500
|
+
"autoincrement": false
|
|
2501
|
+
}
|
|
2502
|
+
},
|
|
2503
|
+
"indexes": {
|
|
2504
|
+
"idx_clients_owner_user_id": {
|
|
2505
|
+
"name": "idx_clients_owner_user_id",
|
|
2506
|
+
"columns": [
|
|
2507
|
+
"tenant_id",
|
|
2508
|
+
"owner_user_id"
|
|
2509
|
+
],
|
|
2510
|
+
"isUnique": false
|
|
2182
2511
|
}
|
|
2183
2512
|
},
|
|
2184
|
-
"indexes": {},
|
|
2185
2513
|
"foreignKeys": {
|
|
2186
2514
|
"clients_tenant_id_tenants_id_fk": {
|
|
2187
2515
|
"name": "clients_tenant_id_tenants_id_fk",
|
|
2188
2516
|
"tableFrom": "clients",
|
|
2189
2517
|
"tableTo": "tenants",
|
|
2190
|
-
"columnsFrom": [
|
|
2191
|
-
|
|
2518
|
+
"columnsFrom": [
|
|
2519
|
+
"tenant_id"
|
|
2520
|
+
],
|
|
2521
|
+
"columnsTo": [
|
|
2522
|
+
"id"
|
|
2523
|
+
],
|
|
2192
2524
|
"onDelete": "cascade",
|
|
2193
2525
|
"onUpdate": "no action"
|
|
2194
2526
|
}
|
|
2195
2527
|
},
|
|
2196
2528
|
"compositePrimaryKeys": {
|
|
2197
2529
|
"clients_tenant_id_client_id": {
|
|
2198
|
-
"columns": [
|
|
2530
|
+
"columns": [
|
|
2531
|
+
"tenant_id",
|
|
2532
|
+
"client_id"
|
|
2533
|
+
],
|
|
2199
2534
|
"name": "clients_tenant_id_client_id"
|
|
2200
2535
|
}
|
|
2201
2536
|
},
|
|
@@ -2309,12 +2644,16 @@
|
|
|
2309
2644
|
"indexes": {
|
|
2310
2645
|
"connections_tenant_id_index": {
|
|
2311
2646
|
"name": "connections_tenant_id_index",
|
|
2312
|
-
"columns": [
|
|
2647
|
+
"columns": [
|
|
2648
|
+
"tenant_id"
|
|
2649
|
+
],
|
|
2313
2650
|
"isUnique": false
|
|
2314
2651
|
},
|
|
2315
2652
|
"connections_id_unique": {
|
|
2316
2653
|
"name": "connections_id_unique",
|
|
2317
|
-
"columns": [
|
|
2654
|
+
"columns": [
|
|
2655
|
+
"id"
|
|
2656
|
+
],
|
|
2318
2657
|
"isUnique": true
|
|
2319
2658
|
}
|
|
2320
2659
|
},
|
|
@@ -2323,15 +2662,22 @@
|
|
|
2323
2662
|
"name": "connections_tenant_id_tenants_id_fk",
|
|
2324
2663
|
"tableFrom": "connections",
|
|
2325
2664
|
"tableTo": "tenants",
|
|
2326
|
-
"columnsFrom": [
|
|
2327
|
-
|
|
2665
|
+
"columnsFrom": [
|
|
2666
|
+
"tenant_id"
|
|
2667
|
+
],
|
|
2668
|
+
"columnsTo": [
|
|
2669
|
+
"id"
|
|
2670
|
+
],
|
|
2328
2671
|
"onDelete": "cascade",
|
|
2329
2672
|
"onUpdate": "no action"
|
|
2330
2673
|
}
|
|
2331
2674
|
},
|
|
2332
2675
|
"compositePrimaryKeys": {
|
|
2333
2676
|
"connections_tenant_id_id_pk": {
|
|
2334
|
-
"columns": [
|
|
2677
|
+
"columns": [
|
|
2678
|
+
"tenant_id",
|
|
2679
|
+
"id"
|
|
2680
|
+
],
|
|
2335
2681
|
"name": "connections_tenant_id_id_pk"
|
|
2336
2682
|
}
|
|
2337
2683
|
},
|
|
@@ -2436,7 +2782,9 @@
|
|
|
2436
2782
|
"indexes": {
|
|
2437
2783
|
"custom_domains_domain_unique": {
|
|
2438
2784
|
"name": "custom_domains_domain_unique",
|
|
2439
|
-
"columns": [
|
|
2785
|
+
"columns": [
|
|
2786
|
+
"domain"
|
|
2787
|
+
],
|
|
2440
2788
|
"isUnique": true
|
|
2441
2789
|
}
|
|
2442
2790
|
},
|
|
@@ -2445,8 +2793,12 @@
|
|
|
2445
2793
|
"name": "custom_domains_tenant_id_tenants_id_fk",
|
|
2446
2794
|
"tableFrom": "custom_domains",
|
|
2447
2795
|
"tableTo": "tenants",
|
|
2448
|
-
"columnsFrom": [
|
|
2449
|
-
|
|
2796
|
+
"columnsFrom": [
|
|
2797
|
+
"tenant_id"
|
|
2798
|
+
],
|
|
2799
|
+
"columnsTo": [
|
|
2800
|
+
"id"
|
|
2801
|
+
],
|
|
2450
2802
|
"onDelete": "cascade",
|
|
2451
2803
|
"onUpdate": "no action"
|
|
2452
2804
|
}
|
|
@@ -2528,8 +2880,12 @@
|
|
|
2528
2880
|
"name": "domains_tenant_id_tenants_id_fk",
|
|
2529
2881
|
"tableFrom": "domains",
|
|
2530
2882
|
"tableTo": "tenants",
|
|
2531
|
-
"columnsFrom": [
|
|
2532
|
-
|
|
2883
|
+
"columnsFrom": [
|
|
2884
|
+
"tenant_id"
|
|
2885
|
+
],
|
|
2886
|
+
"columnsTo": [
|
|
2887
|
+
"id"
|
|
2888
|
+
],
|
|
2533
2889
|
"onDelete": "cascade",
|
|
2534
2890
|
"onUpdate": "no action"
|
|
2535
2891
|
}
|
|
@@ -2657,22 +3013,31 @@
|
|
|
2657
3013
|
"indexes": {
|
|
2658
3014
|
"idx_invites_tenant_id": {
|
|
2659
3015
|
"name": "idx_invites_tenant_id",
|
|
2660
|
-
"columns": [
|
|
3016
|
+
"columns": [
|
|
3017
|
+
"tenant_id"
|
|
3018
|
+
],
|
|
2661
3019
|
"isUnique": false
|
|
2662
3020
|
},
|
|
2663
3021
|
"idx_invites_organization_id": {
|
|
2664
3022
|
"name": "idx_invites_organization_id",
|
|
2665
|
-
"columns": [
|
|
3023
|
+
"columns": [
|
|
3024
|
+
"organization_id"
|
|
3025
|
+
],
|
|
2666
3026
|
"isUnique": false
|
|
2667
3027
|
},
|
|
2668
3028
|
"idx_invites_expires_at": {
|
|
2669
3029
|
"name": "idx_invites_expires_at",
|
|
2670
|
-
"columns": [
|
|
3030
|
+
"columns": [
|
|
3031
|
+
"expires_at"
|
|
3032
|
+
],
|
|
2671
3033
|
"isUnique": false
|
|
2672
3034
|
},
|
|
2673
3035
|
"idx_invites_tenant_created": {
|
|
2674
3036
|
"name": "idx_invites_tenant_created",
|
|
2675
|
-
"columns": [
|
|
3037
|
+
"columns": [
|
|
3038
|
+
"tenant_id",
|
|
3039
|
+
"created_at"
|
|
3040
|
+
],
|
|
2676
3041
|
"isUnique": false
|
|
2677
3042
|
}
|
|
2678
3043
|
},
|
|
@@ -2758,7 +3123,9 @@
|
|
|
2758
3123
|
"indexes": {
|
|
2759
3124
|
"idx_organizations_tenant_id": {
|
|
2760
3125
|
"name": "idx_organizations_tenant_id",
|
|
2761
|
-
"columns": [
|
|
3126
|
+
"columns": [
|
|
3127
|
+
"tenant_id"
|
|
3128
|
+
],
|
|
2762
3129
|
"isUnique": false
|
|
2763
3130
|
}
|
|
2764
3131
|
},
|
|
@@ -2816,22 +3183,32 @@
|
|
|
2816
3183
|
"indexes": {
|
|
2817
3184
|
"user_organizations_unique": {
|
|
2818
3185
|
"name": "user_organizations_unique",
|
|
2819
|
-
"columns": [
|
|
3186
|
+
"columns": [
|
|
3187
|
+
"tenant_id",
|
|
3188
|
+
"user_id",
|
|
3189
|
+
"organization_id"
|
|
3190
|
+
],
|
|
2820
3191
|
"isUnique": true
|
|
2821
3192
|
},
|
|
2822
3193
|
"idx_user_organizations_tenant_id": {
|
|
2823
3194
|
"name": "idx_user_organizations_tenant_id",
|
|
2824
|
-
"columns": [
|
|
3195
|
+
"columns": [
|
|
3196
|
+
"tenant_id"
|
|
3197
|
+
],
|
|
2825
3198
|
"isUnique": false
|
|
2826
3199
|
},
|
|
2827
3200
|
"idx_user_organizations_user_id": {
|
|
2828
3201
|
"name": "idx_user_organizations_user_id",
|
|
2829
|
-
"columns": [
|
|
3202
|
+
"columns": [
|
|
3203
|
+
"user_id"
|
|
3204
|
+
],
|
|
2830
3205
|
"isUnique": false
|
|
2831
3206
|
},
|
|
2832
3207
|
"idx_user_organizations_organization_id": {
|
|
2833
3208
|
"name": "idx_user_organizations_organization_id",
|
|
2834
|
-
"columns": [
|
|
3209
|
+
"columns": [
|
|
3210
|
+
"organization_id"
|
|
3211
|
+
],
|
|
2835
3212
|
"isUnique": false
|
|
2836
3213
|
}
|
|
2837
3214
|
},
|
|
@@ -2968,7 +3345,10 @@
|
|
|
2968
3345
|
"foreignKeys": {},
|
|
2969
3346
|
"compositePrimaryKeys": {
|
|
2970
3347
|
"resource_servers_pk": {
|
|
2971
|
-
"columns": [
|
|
3348
|
+
"columns": [
|
|
3349
|
+
"tenant_id",
|
|
3350
|
+
"id"
|
|
3351
|
+
],
|
|
2972
3352
|
"name": "resource_servers_pk"
|
|
2973
3353
|
}
|
|
2974
3354
|
},
|
|
@@ -3017,7 +3397,10 @@
|
|
|
3017
3397
|
"indexes": {
|
|
3018
3398
|
"role_permissions_role_fk": {
|
|
3019
3399
|
"name": "role_permissions_role_fk",
|
|
3020
|
-
"columns": [
|
|
3400
|
+
"columns": [
|
|
3401
|
+
"tenant_id",
|
|
3402
|
+
"role_id"
|
|
3403
|
+
],
|
|
3021
3404
|
"isUnique": false
|
|
3022
3405
|
},
|
|
3023
3406
|
"role_permissions_permission_fk": {
|
|
@@ -3110,7 +3493,10 @@
|
|
|
3110
3493
|
"foreignKeys": {},
|
|
3111
3494
|
"compositePrimaryKeys": {
|
|
3112
3495
|
"roles_pk": {
|
|
3113
|
-
"columns": [
|
|
3496
|
+
"columns": [
|
|
3497
|
+
"tenant_id",
|
|
3498
|
+
"id"
|
|
3499
|
+
],
|
|
3114
3500
|
"name": "roles_pk"
|
|
3115
3501
|
}
|
|
3116
3502
|
},
|
|
@@ -3167,7 +3553,10 @@
|
|
|
3167
3553
|
"indexes": {
|
|
3168
3554
|
"user_permissions_user_fk": {
|
|
3169
3555
|
"name": "user_permissions_user_fk",
|
|
3170
|
-
"columns": [
|
|
3556
|
+
"columns": [
|
|
3557
|
+
"tenant_id",
|
|
3558
|
+
"user_id"
|
|
3559
|
+
],
|
|
3171
3560
|
"isUnique": false
|
|
3172
3561
|
},
|
|
3173
3562
|
"user_permissions_permission_fk": {
|
|
@@ -3181,7 +3570,9 @@
|
|
|
3181
3570
|
},
|
|
3182
3571
|
"user_permissions_organization_fk": {
|
|
3183
3572
|
"name": "user_permissions_organization_fk",
|
|
3184
|
-
"columns": [
|
|
3573
|
+
"columns": [
|
|
3574
|
+
"organization_id"
|
|
3575
|
+
],
|
|
3185
3576
|
"isUnique": false
|
|
3186
3577
|
}
|
|
3187
3578
|
},
|
|
@@ -3244,24 +3635,37 @@
|
|
|
3244
3635
|
"indexes": {
|
|
3245
3636
|
"user_roles_user_fk": {
|
|
3246
3637
|
"name": "user_roles_user_fk",
|
|
3247
|
-
"columns": [
|
|
3638
|
+
"columns": [
|
|
3639
|
+
"tenant_id",
|
|
3640
|
+
"user_id"
|
|
3641
|
+
],
|
|
3248
3642
|
"isUnique": false
|
|
3249
3643
|
},
|
|
3250
3644
|
"user_roles_role_fk": {
|
|
3251
3645
|
"name": "user_roles_role_fk",
|
|
3252
|
-
"columns": [
|
|
3646
|
+
"columns": [
|
|
3647
|
+
"tenant_id",
|
|
3648
|
+
"role_id"
|
|
3649
|
+
],
|
|
3253
3650
|
"isUnique": false
|
|
3254
3651
|
},
|
|
3255
3652
|
"user_roles_organization_fk": {
|
|
3256
3653
|
"name": "user_roles_organization_fk",
|
|
3257
|
-
"columns": [
|
|
3654
|
+
"columns": [
|
|
3655
|
+
"organization_id"
|
|
3656
|
+
],
|
|
3258
3657
|
"isUnique": false
|
|
3259
3658
|
}
|
|
3260
3659
|
},
|
|
3261
3660
|
"foreignKeys": {},
|
|
3262
3661
|
"compositePrimaryKeys": {
|
|
3263
3662
|
"user_roles_pk": {
|
|
3264
|
-
"columns": [
|
|
3663
|
+
"columns": [
|
|
3664
|
+
"tenant_id",
|
|
3665
|
+
"user_id",
|
|
3666
|
+
"role_id",
|
|
3667
|
+
"organization_id"
|
|
3668
|
+
],
|
|
3265
3669
|
"name": "user_roles_pk"
|
|
3266
3670
|
}
|
|
3267
3671
|
},
|
|
@@ -3341,8 +3745,12 @@
|
|
|
3341
3745
|
"name": "branding_tenant_id_tenants_id_fk",
|
|
3342
3746
|
"tableFrom": "branding",
|
|
3343
3747
|
"tableTo": "tenants",
|
|
3344
|
-
"columnsFrom": [
|
|
3345
|
-
|
|
3748
|
+
"columnsFrom": [
|
|
3749
|
+
"tenant_id"
|
|
3750
|
+
],
|
|
3751
|
+
"columnsTo": [
|
|
3752
|
+
"id"
|
|
3753
|
+
],
|
|
3346
3754
|
"onDelete": "cascade",
|
|
3347
3755
|
"onUpdate": "no action"
|
|
3348
3756
|
}
|
|
@@ -3403,15 +3811,23 @@
|
|
|
3403
3811
|
"name": "custom_text_tenant_id_tenants_id_fk",
|
|
3404
3812
|
"tableFrom": "custom_text",
|
|
3405
3813
|
"tableTo": "tenants",
|
|
3406
|
-
"columnsFrom": [
|
|
3407
|
-
|
|
3814
|
+
"columnsFrom": [
|
|
3815
|
+
"tenant_id"
|
|
3816
|
+
],
|
|
3817
|
+
"columnsTo": [
|
|
3818
|
+
"id"
|
|
3819
|
+
],
|
|
3408
3820
|
"onDelete": "cascade",
|
|
3409
3821
|
"onUpdate": "no action"
|
|
3410
3822
|
}
|
|
3411
3823
|
},
|
|
3412
3824
|
"compositePrimaryKeys": {
|
|
3413
3825
|
"custom_text_tenant_id_prompt_language_pk": {
|
|
3414
|
-
"columns": [
|
|
3826
|
+
"columns": [
|
|
3827
|
+
"tenant_id",
|
|
3828
|
+
"prompt",
|
|
3829
|
+
"language"
|
|
3830
|
+
],
|
|
3415
3831
|
"name": "custom_text_tenant_id_prompt_language_pk"
|
|
3416
3832
|
}
|
|
3417
3833
|
},
|
|
@@ -3486,6 +3902,125 @@
|
|
|
3486
3902
|
"uniqueConstraints": {},
|
|
3487
3903
|
"checkConstraints": {}
|
|
3488
3904
|
},
|
|
3905
|
+
"email_templates": {
|
|
3906
|
+
"name": "email_templates",
|
|
3907
|
+
"columns": {
|
|
3908
|
+
"tenant_id": {
|
|
3909
|
+
"name": "tenant_id",
|
|
3910
|
+
"type": "text(191)",
|
|
3911
|
+
"primaryKey": false,
|
|
3912
|
+
"notNull": true,
|
|
3913
|
+
"autoincrement": false
|
|
3914
|
+
},
|
|
3915
|
+
"template": {
|
|
3916
|
+
"name": "template",
|
|
3917
|
+
"type": "text(64)",
|
|
3918
|
+
"primaryKey": false,
|
|
3919
|
+
"notNull": true,
|
|
3920
|
+
"autoincrement": false
|
|
3921
|
+
},
|
|
3922
|
+
"body": {
|
|
3923
|
+
"name": "body",
|
|
3924
|
+
"type": "text",
|
|
3925
|
+
"primaryKey": false,
|
|
3926
|
+
"notNull": true,
|
|
3927
|
+
"autoincrement": false
|
|
3928
|
+
},
|
|
3929
|
+
"from": {
|
|
3930
|
+
"name": "from",
|
|
3931
|
+
"type": "text(255)",
|
|
3932
|
+
"primaryKey": false,
|
|
3933
|
+
"notNull": true,
|
|
3934
|
+
"autoincrement": false
|
|
3935
|
+
},
|
|
3936
|
+
"subject": {
|
|
3937
|
+
"name": "subject",
|
|
3938
|
+
"type": "text(255)",
|
|
3939
|
+
"primaryKey": false,
|
|
3940
|
+
"notNull": true,
|
|
3941
|
+
"autoincrement": false
|
|
3942
|
+
},
|
|
3943
|
+
"syntax": {
|
|
3944
|
+
"name": "syntax",
|
|
3945
|
+
"type": "text(16)",
|
|
3946
|
+
"primaryKey": false,
|
|
3947
|
+
"notNull": true,
|
|
3948
|
+
"autoincrement": false,
|
|
3949
|
+
"default": "'liquid'"
|
|
3950
|
+
},
|
|
3951
|
+
"result_url": {
|
|
3952
|
+
"name": "result_url",
|
|
3953
|
+
"type": "text(2048)",
|
|
3954
|
+
"primaryKey": false,
|
|
3955
|
+
"notNull": false,
|
|
3956
|
+
"autoincrement": false
|
|
3957
|
+
},
|
|
3958
|
+
"url_lifetime_in_seconds": {
|
|
3959
|
+
"name": "url_lifetime_in_seconds",
|
|
3960
|
+
"type": "integer",
|
|
3961
|
+
"primaryKey": false,
|
|
3962
|
+
"notNull": false,
|
|
3963
|
+
"autoincrement": false
|
|
3964
|
+
},
|
|
3965
|
+
"include_email_in_redirect": {
|
|
3966
|
+
"name": "include_email_in_redirect",
|
|
3967
|
+
"type": "integer",
|
|
3968
|
+
"primaryKey": false,
|
|
3969
|
+
"notNull": true,
|
|
3970
|
+
"autoincrement": false,
|
|
3971
|
+
"default": false
|
|
3972
|
+
},
|
|
3973
|
+
"enabled": {
|
|
3974
|
+
"name": "enabled",
|
|
3975
|
+
"type": "integer",
|
|
3976
|
+
"primaryKey": false,
|
|
3977
|
+
"notNull": true,
|
|
3978
|
+
"autoincrement": false,
|
|
3979
|
+
"default": true
|
|
3980
|
+
},
|
|
3981
|
+
"created_at": {
|
|
3982
|
+
"name": "created_at",
|
|
3983
|
+
"type": "text(35)",
|
|
3984
|
+
"primaryKey": false,
|
|
3985
|
+
"notNull": true,
|
|
3986
|
+
"autoincrement": false
|
|
3987
|
+
},
|
|
3988
|
+
"updated_at": {
|
|
3989
|
+
"name": "updated_at",
|
|
3990
|
+
"type": "text(35)",
|
|
3991
|
+
"primaryKey": false,
|
|
3992
|
+
"notNull": true,
|
|
3993
|
+
"autoincrement": false
|
|
3994
|
+
}
|
|
3995
|
+
},
|
|
3996
|
+
"indexes": {},
|
|
3997
|
+
"foreignKeys": {
|
|
3998
|
+
"email_templates_tenant_id_tenants_id_fk": {
|
|
3999
|
+
"name": "email_templates_tenant_id_tenants_id_fk",
|
|
4000
|
+
"tableFrom": "email_templates",
|
|
4001
|
+
"tableTo": "tenants",
|
|
4002
|
+
"columnsFrom": [
|
|
4003
|
+
"tenant_id"
|
|
4004
|
+
],
|
|
4005
|
+
"columnsTo": [
|
|
4006
|
+
"id"
|
|
4007
|
+
],
|
|
4008
|
+
"onDelete": "cascade",
|
|
4009
|
+
"onUpdate": "no action"
|
|
4010
|
+
}
|
|
4011
|
+
},
|
|
4012
|
+
"compositePrimaryKeys": {
|
|
4013
|
+
"email_templates_tenant_id_template_pk": {
|
|
4014
|
+
"columns": [
|
|
4015
|
+
"tenant_id",
|
|
4016
|
+
"template"
|
|
4017
|
+
],
|
|
4018
|
+
"name": "email_templates_tenant_id_template_pk"
|
|
4019
|
+
}
|
|
4020
|
+
},
|
|
4021
|
+
"uniqueConstraints": {},
|
|
4022
|
+
"checkConstraints": {}
|
|
4023
|
+
},
|
|
3489
4024
|
"flows": {
|
|
3490
4025
|
"name": "flows",
|
|
3491
4026
|
"columns": {
|
|
@@ -3535,7 +4070,9 @@
|
|
|
3535
4070
|
"indexes": {
|
|
3536
4071
|
"flows_tenant_id_idx": {
|
|
3537
4072
|
"name": "flows_tenant_id_idx",
|
|
3538
|
-
"columns": [
|
|
4073
|
+
"columns": [
|
|
4074
|
+
"tenant_id"
|
|
4075
|
+
],
|
|
3539
4076
|
"isUnique": false
|
|
3540
4077
|
}
|
|
3541
4078
|
},
|
|
@@ -3544,8 +4081,12 @@
|
|
|
3544
4081
|
"name": "flows_tenant_id_tenants_id_fk",
|
|
3545
4082
|
"tableFrom": "flows",
|
|
3546
4083
|
"tableTo": "tenants",
|
|
3547
|
-
"columnsFrom": [
|
|
3548
|
-
|
|
4084
|
+
"columnsFrom": [
|
|
4085
|
+
"tenant_id"
|
|
4086
|
+
],
|
|
4087
|
+
"columnsTo": [
|
|
4088
|
+
"id"
|
|
4089
|
+
],
|
|
3549
4090
|
"onDelete": "cascade",
|
|
3550
4091
|
"onUpdate": "no action"
|
|
3551
4092
|
}
|
|
@@ -3645,7 +4186,9 @@
|
|
|
3645
4186
|
"indexes": {
|
|
3646
4187
|
"forms_tenant_id_idx": {
|
|
3647
4188
|
"name": "forms_tenant_id_idx",
|
|
3648
|
-
"columns": [
|
|
4189
|
+
"columns": [
|
|
4190
|
+
"tenant_id"
|
|
4191
|
+
],
|
|
3649
4192
|
"isUnique": false
|
|
3650
4193
|
}
|
|
3651
4194
|
},
|
|
@@ -3654,8 +4197,12 @@
|
|
|
3654
4197
|
"name": "forms_tenant_id_tenants_id_fk",
|
|
3655
4198
|
"tableFrom": "forms",
|
|
3656
4199
|
"tableTo": "tenants",
|
|
3657
|
-
"columnsFrom": [
|
|
3658
|
-
|
|
4200
|
+
"columnsFrom": [
|
|
4201
|
+
"tenant_id"
|
|
4202
|
+
],
|
|
4203
|
+
"columnsTo": [
|
|
4204
|
+
"id"
|
|
4205
|
+
],
|
|
3659
4206
|
"onDelete": "cascade",
|
|
3660
4207
|
"onUpdate": "no action"
|
|
3661
4208
|
}
|
|
@@ -3713,7 +4260,9 @@
|
|
|
3713
4260
|
"indexes": {
|
|
3714
4261
|
"hook_code_tenant_id_idx": {
|
|
3715
4262
|
"name": "hook_code_tenant_id_idx",
|
|
3716
|
-
"columns": [
|
|
4263
|
+
"columns": [
|
|
4264
|
+
"tenant_id"
|
|
4265
|
+
],
|
|
3717
4266
|
"isUnique": false
|
|
3718
4267
|
}
|
|
3719
4268
|
},
|
|
@@ -3722,8 +4271,12 @@
|
|
|
3722
4271
|
"name": "hook_code_tenant_id_tenants_id_fk",
|
|
3723
4272
|
"tableFrom": "hook_code",
|
|
3724
4273
|
"tableTo": "tenants",
|
|
3725
|
-
"columnsFrom": [
|
|
3726
|
-
|
|
4274
|
+
"columnsFrom": [
|
|
4275
|
+
"tenant_id"
|
|
4276
|
+
],
|
|
4277
|
+
"columnsTo": [
|
|
4278
|
+
"id"
|
|
4279
|
+
],
|
|
3727
4280
|
"onDelete": "cascade",
|
|
3728
4281
|
"onUpdate": "no action"
|
|
3729
4282
|
}
|
|
@@ -3819,12 +4372,21 @@
|
|
|
3819
4372
|
"primaryKey": false,
|
|
3820
4373
|
"notNull": false,
|
|
3821
4374
|
"autoincrement": false
|
|
4375
|
+
},
|
|
4376
|
+
"metadata": {
|
|
4377
|
+
"name": "metadata",
|
|
4378
|
+
"type": "text",
|
|
4379
|
+
"primaryKey": false,
|
|
4380
|
+
"notNull": false,
|
|
4381
|
+
"autoincrement": false
|
|
3822
4382
|
}
|
|
3823
4383
|
},
|
|
3824
4384
|
"indexes": {
|
|
3825
4385
|
"hooks_tenant_id_idx": {
|
|
3826
4386
|
"name": "hooks_tenant_id_idx",
|
|
3827
|
-
"columns": [
|
|
4387
|
+
"columns": [
|
|
4388
|
+
"tenant_id"
|
|
4389
|
+
],
|
|
3828
4390
|
"isUnique": false
|
|
3829
4391
|
}
|
|
3830
4392
|
},
|
|
@@ -3833,8 +4395,12 @@
|
|
|
3833
4395
|
"name": "hooks_tenant_id_tenants_id_fk",
|
|
3834
4396
|
"tableFrom": "hooks",
|
|
3835
4397
|
"tableTo": "tenants",
|
|
3836
|
-
"columnsFrom": [
|
|
3837
|
-
|
|
4398
|
+
"columnsFrom": [
|
|
4399
|
+
"tenant_id"
|
|
4400
|
+
],
|
|
4401
|
+
"columnsTo": [
|
|
4402
|
+
"id"
|
|
4403
|
+
],
|
|
3838
4404
|
"onDelete": "cascade",
|
|
3839
4405
|
"onUpdate": "no action"
|
|
3840
4406
|
}
|
|
@@ -3938,8 +4504,12 @@
|
|
|
3938
4504
|
"name": "keys_tenant_id_tenants_id_fk",
|
|
3939
4505
|
"tableFrom": "keys",
|
|
3940
4506
|
"tableTo": "tenants",
|
|
3941
|
-
"columnsFrom": [
|
|
3942
|
-
|
|
4507
|
+
"columnsFrom": [
|
|
4508
|
+
"tenant_id"
|
|
4509
|
+
],
|
|
4510
|
+
"columnsTo": [
|
|
4511
|
+
"id"
|
|
4512
|
+
],
|
|
3943
4513
|
"onDelete": "cascade",
|
|
3944
4514
|
"onUpdate": "no action"
|
|
3945
4515
|
},
|
|
@@ -3947,8 +4517,12 @@
|
|
|
3947
4517
|
"name": "keys_connection_connections_id_fk",
|
|
3948
4518
|
"tableFrom": "keys",
|
|
3949
4519
|
"tableTo": "connections",
|
|
3950
|
-
"columnsFrom": [
|
|
3951
|
-
|
|
4520
|
+
"columnsFrom": [
|
|
4521
|
+
"connection"
|
|
4522
|
+
],
|
|
4523
|
+
"columnsTo": [
|
|
4524
|
+
"id"
|
|
4525
|
+
],
|
|
3952
4526
|
"onDelete": "cascade",
|
|
3953
4527
|
"onUpdate": "no action"
|
|
3954
4528
|
}
|
|
@@ -4405,7 +4979,9 @@
|
|
|
4405
4979
|
"indexes": {
|
|
4406
4980
|
"themes_tenant_id_idx": {
|
|
4407
4981
|
"name": "themes_tenant_id_idx",
|
|
4408
|
-
"columns": [
|
|
4982
|
+
"columns": [
|
|
4983
|
+
"tenant_id"
|
|
4984
|
+
],
|
|
4409
4985
|
"isUnique": false
|
|
4410
4986
|
}
|
|
4411
4987
|
},
|
|
@@ -4414,15 +4990,22 @@
|
|
|
4414
4990
|
"name": "themes_tenant_id_tenants_id_fk",
|
|
4415
4991
|
"tableFrom": "themes",
|
|
4416
4992
|
"tableTo": "tenants",
|
|
4417
|
-
"columnsFrom": [
|
|
4418
|
-
|
|
4993
|
+
"columnsFrom": [
|
|
4994
|
+
"tenant_id"
|
|
4995
|
+
],
|
|
4996
|
+
"columnsTo": [
|
|
4997
|
+
"id"
|
|
4998
|
+
],
|
|
4419
4999
|
"onDelete": "cascade",
|
|
4420
5000
|
"onUpdate": "no action"
|
|
4421
5001
|
}
|
|
4422
5002
|
},
|
|
4423
5003
|
"compositePrimaryKeys": {
|
|
4424
5004
|
"themes_pkey": {
|
|
4425
|
-
"columns": [
|
|
5005
|
+
"columns": [
|
|
5006
|
+
"tenant_id",
|
|
5007
|
+
"themeId"
|
|
5008
|
+
],
|
|
4426
5009
|
"name": "themes_pkey"
|
|
4427
5010
|
}
|
|
4428
5011
|
},
|
|
@@ -4467,8 +5050,12 @@
|
|
|
4467
5050
|
"name": "universal_login_templates_tenant_id_tenants_id_fk",
|
|
4468
5051
|
"tableFrom": "universal_login_templates",
|
|
4469
5052
|
"tableTo": "tenants",
|
|
4470
|
-
"columnsFrom": [
|
|
4471
|
-
|
|
5053
|
+
"columnsFrom": [
|
|
5054
|
+
"tenant_id"
|
|
5055
|
+
],
|
|
5056
|
+
"columnsTo": [
|
|
5057
|
+
"id"
|
|
5058
|
+
],
|
|
4472
5059
|
"onDelete": "cascade",
|
|
4473
5060
|
"onUpdate": "no action"
|
|
4474
5061
|
}
|
|
@@ -4590,12 +5177,17 @@
|
|
|
4590
5177
|
"indexes": {
|
|
4591
5178
|
"authentication_methods_tenant_user_idx": {
|
|
4592
5179
|
"name": "authentication_methods_tenant_user_idx",
|
|
4593
|
-
"columns": [
|
|
5180
|
+
"columns": [
|
|
5181
|
+
"tenant_id",
|
|
5182
|
+
"user_id"
|
|
5183
|
+
],
|
|
4594
5184
|
"isUnique": false
|
|
4595
5185
|
},
|
|
4596
5186
|
"authentication_methods_credential_id_idx": {
|
|
4597
5187
|
"name": "authentication_methods_credential_id_idx",
|
|
4598
|
-
"columns": [
|
|
5188
|
+
"columns": [
|
|
5189
|
+
"credential_id"
|
|
5190
|
+
],
|
|
4599
5191
|
"isUnique": false
|
|
4600
5192
|
}
|
|
4601
5193
|
},
|
|
@@ -4604,8 +5196,12 @@
|
|
|
4604
5196
|
"name": "authentication_methods_tenant_id_tenants_id_fk",
|
|
4605
5197
|
"tableFrom": "authentication_methods",
|
|
4606
5198
|
"tableTo": "tenants",
|
|
4607
|
-
"columnsFrom": [
|
|
4608
|
-
|
|
5199
|
+
"columnsFrom": [
|
|
5200
|
+
"tenant_id"
|
|
5201
|
+
],
|
|
5202
|
+
"columnsTo": [
|
|
5203
|
+
"id"
|
|
5204
|
+
],
|
|
4609
5205
|
"onDelete": "cascade",
|
|
4610
5206
|
"onUpdate": "no action"
|
|
4611
5207
|
}
|
|
@@ -4824,22 +5420,33 @@
|
|
|
4824
5420
|
"indexes": {
|
|
4825
5421
|
"logs_user_id": {
|
|
4826
5422
|
"name": "logs_user_id",
|
|
4827
|
-
"columns": [
|
|
5423
|
+
"columns": [
|
|
5424
|
+
"user_id"
|
|
5425
|
+
],
|
|
4828
5426
|
"isUnique": false
|
|
4829
5427
|
},
|
|
4830
5428
|
"logs_tenant_id": {
|
|
4831
5429
|
"name": "logs_tenant_id",
|
|
4832
|
-
"columns": [
|
|
5430
|
+
"columns": [
|
|
5431
|
+
"tenant_id"
|
|
5432
|
+
],
|
|
4833
5433
|
"isUnique": false
|
|
4834
5434
|
},
|
|
4835
5435
|
"logs_date": {
|
|
4836
5436
|
"name": "logs_date",
|
|
4837
|
-
"columns": [
|
|
5437
|
+
"columns": [
|
|
5438
|
+
"date"
|
|
5439
|
+
],
|
|
4838
5440
|
"isUnique": false
|
|
4839
5441
|
},
|
|
4840
5442
|
"IDX_logs_tenant_date_type_user": {
|
|
4841
5443
|
"name": "IDX_logs_tenant_date_type_user",
|
|
4842
|
-
"columns": [
|
|
5444
|
+
"columns": [
|
|
5445
|
+
"tenant_id",
|
|
5446
|
+
"date",
|
|
5447
|
+
"type",
|
|
5448
|
+
"user_id"
|
|
5449
|
+
],
|
|
4843
5450
|
"isUnique": false
|
|
4844
5451
|
}
|
|
4845
5452
|
},
|
|
@@ -4968,22 +5575,31 @@
|
|
|
4968
5575
|
"indexes": {
|
|
4969
5576
|
"idx_outbox_events_tenant_id": {
|
|
4970
5577
|
"name": "idx_outbox_events_tenant_id",
|
|
4971
|
-
"columns": [
|
|
5578
|
+
"columns": [
|
|
5579
|
+
"tenant_id"
|
|
5580
|
+
],
|
|
4972
5581
|
"isUnique": false
|
|
4973
5582
|
},
|
|
4974
5583
|
"idx_outbox_events_processed_at": {
|
|
4975
5584
|
"name": "idx_outbox_events_processed_at",
|
|
4976
|
-
"columns": [
|
|
5585
|
+
"columns": [
|
|
5586
|
+
"processed_at"
|
|
5587
|
+
],
|
|
4977
5588
|
"isUnique": false
|
|
4978
5589
|
},
|
|
4979
5590
|
"idx_outbox_events_claimed_by": {
|
|
4980
5591
|
"name": "idx_outbox_events_claimed_by",
|
|
4981
|
-
"columns": [
|
|
5592
|
+
"columns": [
|
|
5593
|
+
"claimed_by"
|
|
5594
|
+
],
|
|
4982
5595
|
"isUnique": false
|
|
4983
5596
|
},
|
|
4984
5597
|
"idx_outbox_events_tenant_dead_lettered": {
|
|
4985
5598
|
"name": "idx_outbox_events_tenant_dead_lettered",
|
|
4986
|
-
"columns": [
|
|
5599
|
+
"columns": [
|
|
5600
|
+
"tenant_id",
|
|
5601
|
+
"dead_lettered_at"
|
|
5602
|
+
],
|
|
4987
5603
|
"isUnique": false
|
|
4988
5604
|
}
|
|
4989
5605
|
},
|
|
@@ -4992,8 +5608,12 @@
|
|
|
4992
5608
|
"name": "outbox_events_tenant_id_tenants_id_fk",
|
|
4993
5609
|
"tableFrom": "outbox_events",
|
|
4994
5610
|
"tableTo": "tenants",
|
|
4995
|
-
"columnsFrom": [
|
|
4996
|
-
|
|
5611
|
+
"columnsFrom": [
|
|
5612
|
+
"tenant_id"
|
|
5613
|
+
],
|
|
5614
|
+
"columnsTo": [
|
|
5615
|
+
"id"
|
|
5616
|
+
],
|
|
4997
5617
|
"onDelete": "cascade",
|
|
4998
5618
|
"onUpdate": "no action"
|
|
4999
5619
|
}
|
|
@@ -5013,4 +5633,4 @@
|
|
|
5013
5633
|
"internal": {
|
|
5014
5634
|
"indexes": {}
|
|
5015
5635
|
}
|
|
5016
|
-
}
|
|
5636
|
+
}
|