@authhero/drizzle 0.43.4 → 0.43.5

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.
@@ -383,12 +383,8 @@
383
383
  "name": "passwords_tenant_id_tenants_id_fk",
384
384
  "tableFrom": "passwords",
385
385
  "tableTo": "tenants",
386
- "columnsFrom": [
387
- "tenant_id"
388
- ],
389
- "columnsTo": [
390
- "id"
391
- ],
386
+ "columnsFrom": ["tenant_id"],
387
+ "columnsTo": ["id"],
392
388
  "onDelete": "cascade",
393
389
  "onUpdate": "no action"
394
390
  }
@@ -651,59 +647,37 @@
651
647
  "indexes": {
652
648
  "unique_email_provider": {
653
649
  "name": "unique_email_provider",
654
- "columns": [
655
- "email",
656
- "provider",
657
- "tenant_id"
658
- ],
650
+ "columns": ["email", "provider", "tenant_id"],
659
651
  "isUnique": true
660
652
  },
661
653
  "unique_phone_provider": {
662
654
  "name": "unique_phone_provider",
663
- "columns": [
664
- "phone_number",
665
- "provider",
666
- "tenant_id"
667
- ],
655
+ "columns": ["phone_number", "provider", "tenant_id"],
668
656
  "isUnique": true
669
657
  },
670
658
  "unique_username_provider": {
671
659
  "name": "unique_username_provider",
672
- "columns": [
673
- "username",
674
- "provider",
675
- "tenant_id"
676
- ],
660
+ "columns": ["username", "provider", "tenant_id"],
677
661
  "isUnique": true
678
662
  },
679
663
  "users_email_index": {
680
664
  "name": "users_email_index",
681
- "columns": [
682
- "email"
683
- ],
665
+ "columns": ["email"],
684
666
  "isUnique": false
685
667
  },
686
668
  "users_linked_to_index": {
687
669
  "name": "users_linked_to_index",
688
- "columns": [
689
- "linked_to"
690
- ],
670
+ "columns": ["linked_to"],
691
671
  "isUnique": false
692
672
  },
693
673
  "users_name_index": {
694
674
  "name": "users_name_index",
695
- "columns": [
696
- "name"
697
- ],
675
+ "columns": ["name"],
698
676
  "isUnique": false
699
677
  },
700
678
  "users_phone_tenant_provider_index": {
701
679
  "name": "users_phone_tenant_provider_index",
702
- "columns": [
703
- "tenant_id",
704
- "phone_number",
705
- "provider"
706
- ],
680
+ "columns": ["tenant_id", "phone_number", "provider"],
707
681
  "isUnique": false
708
682
  }
709
683
  },
@@ -712,22 +686,15 @@
712
686
  "name": "users_tenant_id_tenants_id_fk",
713
687
  "tableFrom": "users",
714
688
  "tableTo": "tenants",
715
- "columnsFrom": [
716
- "tenant_id"
717
- ],
718
- "columnsTo": [
719
- "id"
720
- ],
689
+ "columnsFrom": ["tenant_id"],
690
+ "columnsTo": ["id"],
721
691
  "onDelete": "cascade",
722
692
  "onUpdate": "no action"
723
693
  }
724
694
  },
725
695
  "compositePrimaryKeys": {
726
696
  "users_tenants": {
727
- "columns": [
728
- "user_id",
729
- "tenant_id"
730
- ],
697
+ "columns": ["user_id", "tenant_id"],
731
698
  "name": "users_tenants"
732
699
  }
733
700
  },
@@ -835,12 +802,8 @@
835
802
  "name": "authentication_codes_tenant_id_tenants_id_fk",
836
803
  "tableFrom": "authentication_codes",
837
804
  "tableTo": "tenants",
838
- "columnsFrom": [
839
- "tenant_id"
840
- ],
841
- "columnsTo": [
842
- "id"
843
- ],
805
+ "columnsFrom": ["tenant_id"],
806
+ "columnsTo": ["id"],
844
807
  "onDelete": "cascade",
845
808
  "onUpdate": "no action"
846
809
  }
@@ -961,9 +924,7 @@
961
924
  "indexes": {
962
925
  "codes_expires_at_index": {
963
926
  "name": "codes_expires_at_index",
964
- "columns": [
965
- "expires_at"
966
- ],
927
+ "columns": ["expires_at"],
967
928
  "isUnique": false
968
929
  }
969
930
  },
@@ -972,22 +933,15 @@
972
933
  "name": "codes_tenant_id_tenants_id_fk",
973
934
  "tableFrom": "codes",
974
935
  "tableTo": "tenants",
975
- "columnsFrom": [
976
- "tenant_id"
977
- ],
978
- "columnsTo": [
979
- "id"
980
- ],
936
+ "columnsFrom": ["tenant_id"],
937
+ "columnsTo": ["id"],
981
938
  "onDelete": "cascade",
982
939
  "onUpdate": "no action"
983
940
  }
984
941
  },
985
942
  "compositePrimaryKeys": {
986
943
  "PK_codes_code_id_code_type": {
987
- "columns": [
988
- "code_id",
989
- "code_type"
990
- ],
944
+ "columns": ["code_id", "code_type"],
991
945
  "name": "PK_codes_code_id_code_type"
992
946
  }
993
947
  },
@@ -1142,39 +1096,27 @@
1142
1096
  "indexes": {
1143
1097
  "login_sessions_id_index": {
1144
1098
  "name": "login_sessions_id_index",
1145
- "columns": [
1146
- "id"
1147
- ],
1099
+ "columns": ["id"],
1148
1100
  "isUnique": false
1149
1101
  },
1150
1102
  "login_sessions_state_idx": {
1151
1103
  "name": "login_sessions_state_idx",
1152
- "columns": [
1153
- "state"
1154
- ],
1104
+ "columns": ["state"],
1155
1105
  "isUnique": false
1156
1106
  },
1157
1107
  "login_sessions_state_updated_idx": {
1158
1108
  "name": "login_sessions_state_updated_idx",
1159
- "columns": [
1160
- "state",
1161
- "updated_at_ts"
1162
- ],
1109
+ "columns": ["state", "updated_at_ts"],
1163
1110
  "isUnique": false
1164
1111
  },
1165
1112
  "login_sessions_tenant_user_idx": {
1166
1113
  "name": "login_sessions_tenant_user_idx",
1167
- "columns": [
1168
- "tenant_id",
1169
- "user_id"
1170
- ],
1114
+ "columns": ["tenant_id", "user_id"],
1171
1115
  "isUnique": false
1172
1116
  },
1173
1117
  "idx_login_sessions_expires_at_ts": {
1174
1118
  "name": "idx_login_sessions_expires_at_ts",
1175
- "columns": [
1176
- "expires_at_ts"
1177
- ],
1119
+ "columns": ["expires_at_ts"],
1178
1120
  "isUnique": false
1179
1121
  }
1180
1122
  },
@@ -1183,22 +1125,15 @@
1183
1125
  "name": "login_sessions_tenant_id_tenants_id_fk",
1184
1126
  "tableFrom": "login_sessions",
1185
1127
  "tableTo": "tenants",
1186
- "columnsFrom": [
1187
- "tenant_id"
1188
- ],
1189
- "columnsTo": [
1190
- "id"
1191
- ],
1128
+ "columnsFrom": ["tenant_id"],
1129
+ "columnsTo": ["id"],
1192
1130
  "onDelete": "cascade",
1193
1131
  "onUpdate": "no action"
1194
1132
  }
1195
1133
  },
1196
1134
  "compositePrimaryKeys": {
1197
1135
  "login_sessions_pk": {
1198
- "columns": [
1199
- "tenant_id",
1200
- "id"
1201
- ],
1136
+ "columns": ["tenant_id", "id"],
1202
1137
  "name": "login_sessions_pk"
1203
1138
  }
1204
1139
  },
@@ -1338,16 +1273,12 @@
1338
1273
  "indexes": {
1339
1274
  "otps_email_index": {
1340
1275
  "name": "otps_email_index",
1341
- "columns": [
1342
- "email"
1343
- ],
1276
+ "columns": ["email"],
1344
1277
  "isUnique": false
1345
1278
  },
1346
1279
  "otps_expires_at_index": {
1347
1280
  "name": "otps_expires_at_index",
1348
- "columns": [
1349
- "expires_at"
1350
- ],
1281
+ "columns": ["expires_at"],
1351
1282
  "isUnique": false
1352
1283
  }
1353
1284
  },
@@ -1356,12 +1287,8 @@
1356
1287
  "name": "otps_tenant_id_tenants_id_fk",
1357
1288
  "tableFrom": "otps",
1358
1289
  "tableTo": "tenants",
1359
- "columnsFrom": [
1360
- "tenant_id"
1361
- ],
1362
- "columnsTo": [
1363
- "id"
1364
- ],
1290
+ "columnsFrom": ["tenant_id"],
1291
+ "columnsTo": ["id"],
1365
1292
  "onDelete": "cascade",
1366
1293
  "onUpdate": "no action"
1367
1294
  }
@@ -1468,24 +1395,17 @@
1468
1395
  "indexes": {
1469
1396
  "idx_refresh_tokens_user_id": {
1470
1397
  "name": "idx_refresh_tokens_user_id",
1471
- "columns": [
1472
- "tenant_id",
1473
- "user_id"
1474
- ],
1398
+ "columns": ["tenant_id", "user_id"],
1475
1399
  "isUnique": false
1476
1400
  },
1477
1401
  "idx_refresh_tokens_login_id": {
1478
1402
  "name": "idx_refresh_tokens_login_id",
1479
- "columns": [
1480
- "login_id"
1481
- ],
1403
+ "columns": ["login_id"],
1482
1404
  "isUnique": false
1483
1405
  },
1484
1406
  "idx_refresh_tokens_expires_at_ts": {
1485
1407
  "name": "idx_refresh_tokens_expires_at_ts",
1486
- "columns": [
1487
- "expires_at_ts"
1488
- ],
1408
+ "columns": ["expires_at_ts"],
1489
1409
  "isUnique": false
1490
1410
  }
1491
1411
  },
@@ -1494,22 +1414,15 @@
1494
1414
  "name": "refresh_tokens_tenant_id_tenants_id_fk",
1495
1415
  "tableFrom": "refresh_tokens",
1496
1416
  "tableTo": "tenants",
1497
- "columnsFrom": [
1498
- "tenant_id"
1499
- ],
1500
- "columnsTo": [
1501
- "id"
1502
- ],
1417
+ "columnsFrom": ["tenant_id"],
1418
+ "columnsTo": ["id"],
1503
1419
  "onDelete": "cascade",
1504
1420
  "onUpdate": "no action"
1505
1421
  }
1506
1422
  },
1507
1423
  "compositePrimaryKeys": {
1508
1424
  "refresh_tokens_pk": {
1509
- "columns": [
1510
- "tenant_id",
1511
- "id"
1512
- ],
1425
+ "columns": ["tenant_id", "id"],
1513
1426
  "name": "refresh_tokens_pk"
1514
1427
  }
1515
1428
  },
@@ -1621,24 +1534,17 @@
1621
1534
  "indexes": {
1622
1535
  "IDX_sessions_login_session_id": {
1623
1536
  "name": "IDX_sessions_login_session_id",
1624
- "columns": [
1625
- "login_session_id"
1626
- ],
1537
+ "columns": ["login_session_id"],
1627
1538
  "isUnique": false
1628
1539
  },
1629
1540
  "idx_sessions_user_id": {
1630
1541
  "name": "idx_sessions_user_id",
1631
- "columns": [
1632
- "tenant_id",
1633
- "user_id"
1634
- ],
1542
+ "columns": ["tenant_id", "user_id"],
1635
1543
  "isUnique": false
1636
1544
  },
1637
1545
  "idx_sessions_expires_at_ts": {
1638
1546
  "name": "idx_sessions_expires_at_ts",
1639
- "columns": [
1640
- "expires_at_ts"
1641
- ],
1547
+ "columns": ["expires_at_ts"],
1642
1548
  "isUnique": false
1643
1549
  }
1644
1550
  },
@@ -1647,22 +1553,15 @@
1647
1553
  "name": "sessions_tenant_id_tenants_id_fk",
1648
1554
  "tableFrom": "sessions",
1649
1555
  "tableTo": "tenants",
1650
- "columnsFrom": [
1651
- "tenant_id"
1652
- ],
1653
- "columnsTo": [
1654
- "id"
1655
- ],
1556
+ "columnsFrom": ["tenant_id"],
1557
+ "columnsTo": ["id"],
1656
1558
  "onDelete": "cascade",
1657
1559
  "onUpdate": "no action"
1658
1560
  }
1659
1561
  },
1660
1562
  "compositePrimaryKeys": {
1661
1563
  "sessions_pk": {
1662
- "columns": [
1663
- "tenant_id",
1664
- "id"
1665
- ],
1564
+ "columns": ["tenant_id", "id"],
1666
1565
  "name": "sessions_pk"
1667
1566
  }
1668
1567
  },
@@ -1770,12 +1669,8 @@
1770
1669
  "name": "tickets_tenant_id_tenants_id_fk",
1771
1670
  "tableFrom": "tickets",
1772
1671
  "tableTo": "tenants",
1773
- "columnsFrom": [
1774
- "tenant_id"
1775
- ],
1776
- "columnsTo": [
1777
- "id"
1778
- ],
1672
+ "columnsFrom": ["tenant_id"],
1673
+ "columnsTo": ["id"],
1779
1674
  "onDelete": "cascade",
1780
1675
  "onUpdate": "no action"
1781
1676
  }
@@ -1879,9 +1774,7 @@
1879
1774
  "indexes": {
1880
1775
  "idx_client_grants_audience": {
1881
1776
  "name": "idx_client_grants_audience",
1882
- "columns": [
1883
- "audience"
1884
- ],
1777
+ "columns": ["audience"],
1885
1778
  "isUnique": false
1886
1779
  }
1887
1780
  },
@@ -1890,22 +1783,15 @@
1890
1783
  "name": "client_grants_tenant_id_tenants_id_fk",
1891
1784
  "tableFrom": "client_grants",
1892
1785
  "tableTo": "tenants",
1893
- "columnsFrom": [
1894
- "tenant_id"
1895
- ],
1896
- "columnsTo": [
1897
- "id"
1898
- ],
1786
+ "columnsFrom": ["tenant_id"],
1787
+ "columnsTo": ["id"],
1899
1788
  "onDelete": "cascade",
1900
1789
  "onUpdate": "no action"
1901
1790
  }
1902
1791
  },
1903
1792
  "compositePrimaryKeys": {
1904
1793
  "pk_client_grants": {
1905
- "columns": [
1906
- "tenant_id",
1907
- "id"
1908
- ],
1794
+ "columns": ["tenant_id", "id"],
1909
1795
  "name": "pk_client_grants"
1910
1796
  }
1911
1797
  },
@@ -2294,22 +2180,15 @@
2294
2180
  "name": "clients_tenant_id_tenants_id_fk",
2295
2181
  "tableFrom": "clients",
2296
2182
  "tableTo": "tenants",
2297
- "columnsFrom": [
2298
- "tenant_id"
2299
- ],
2300
- "columnsTo": [
2301
- "id"
2302
- ],
2183
+ "columnsFrom": ["tenant_id"],
2184
+ "columnsTo": ["id"],
2303
2185
  "onDelete": "cascade",
2304
2186
  "onUpdate": "no action"
2305
2187
  }
2306
2188
  },
2307
2189
  "compositePrimaryKeys": {
2308
2190
  "clients_tenant_id_client_id": {
2309
- "columns": [
2310
- "tenant_id",
2311
- "client_id"
2312
- ],
2191
+ "columns": ["tenant_id", "client_id"],
2313
2192
  "name": "clients_tenant_id_client_id"
2314
2193
  }
2315
2194
  },
@@ -2423,16 +2302,12 @@
2423
2302
  "indexes": {
2424
2303
  "connections_tenant_id_index": {
2425
2304
  "name": "connections_tenant_id_index",
2426
- "columns": [
2427
- "tenant_id"
2428
- ],
2305
+ "columns": ["tenant_id"],
2429
2306
  "isUnique": false
2430
2307
  },
2431
2308
  "connections_id_unique": {
2432
2309
  "name": "connections_id_unique",
2433
- "columns": [
2434
- "id"
2435
- ],
2310
+ "columns": ["id"],
2436
2311
  "isUnique": true
2437
2312
  }
2438
2313
  },
@@ -2441,22 +2316,15 @@
2441
2316
  "name": "connections_tenant_id_tenants_id_fk",
2442
2317
  "tableFrom": "connections",
2443
2318
  "tableTo": "tenants",
2444
- "columnsFrom": [
2445
- "tenant_id"
2446
- ],
2447
- "columnsTo": [
2448
- "id"
2449
- ],
2319
+ "columnsFrom": ["tenant_id"],
2320
+ "columnsTo": ["id"],
2450
2321
  "onDelete": "cascade",
2451
2322
  "onUpdate": "no action"
2452
2323
  }
2453
2324
  },
2454
2325
  "compositePrimaryKeys": {
2455
2326
  "connections_tenant_id_id_pk": {
2456
- "columns": [
2457
- "tenant_id",
2458
- "id"
2459
- ],
2327
+ "columns": ["tenant_id", "id"],
2460
2328
  "name": "connections_tenant_id_id_pk"
2461
2329
  }
2462
2330
  },
@@ -2561,9 +2429,7 @@
2561
2429
  "indexes": {
2562
2430
  "custom_domains_domain_unique": {
2563
2431
  "name": "custom_domains_domain_unique",
2564
- "columns": [
2565
- "domain"
2566
- ],
2432
+ "columns": ["domain"],
2567
2433
  "isUnique": true
2568
2434
  }
2569
2435
  },
@@ -2572,12 +2438,8 @@
2572
2438
  "name": "custom_domains_tenant_id_tenants_id_fk",
2573
2439
  "tableFrom": "custom_domains",
2574
2440
  "tableTo": "tenants",
2575
- "columnsFrom": [
2576
- "tenant_id"
2577
- ],
2578
- "columnsTo": [
2579
- "id"
2580
- ],
2441
+ "columnsFrom": ["tenant_id"],
2442
+ "columnsTo": ["id"],
2581
2443
  "onDelete": "cascade",
2582
2444
  "onUpdate": "no action"
2583
2445
  }
@@ -2659,12 +2521,8 @@
2659
2521
  "name": "domains_tenant_id_tenants_id_fk",
2660
2522
  "tableFrom": "domains",
2661
2523
  "tableTo": "tenants",
2662
- "columnsFrom": [
2663
- "tenant_id"
2664
- ],
2665
- "columnsTo": [
2666
- "id"
2667
- ],
2524
+ "columnsFrom": ["tenant_id"],
2525
+ "columnsTo": ["id"],
2668
2526
  "onDelete": "cascade",
2669
2527
  "onUpdate": "no action"
2670
2528
  }
@@ -2792,31 +2650,22 @@
2792
2650
  "indexes": {
2793
2651
  "idx_invites_tenant_id": {
2794
2652
  "name": "idx_invites_tenant_id",
2795
- "columns": [
2796
- "tenant_id"
2797
- ],
2653
+ "columns": ["tenant_id"],
2798
2654
  "isUnique": false
2799
2655
  },
2800
2656
  "idx_invites_organization_id": {
2801
2657
  "name": "idx_invites_organization_id",
2802
- "columns": [
2803
- "organization_id"
2804
- ],
2658
+ "columns": ["organization_id"],
2805
2659
  "isUnique": false
2806
2660
  },
2807
2661
  "idx_invites_expires_at": {
2808
2662
  "name": "idx_invites_expires_at",
2809
- "columns": [
2810
- "expires_at"
2811
- ],
2663
+ "columns": ["expires_at"],
2812
2664
  "isUnique": false
2813
2665
  },
2814
2666
  "idx_invites_tenant_created": {
2815
2667
  "name": "idx_invites_tenant_created",
2816
- "columns": [
2817
- "tenant_id",
2818
- "created_at"
2819
- ],
2668
+ "columns": ["tenant_id", "created_at"],
2820
2669
  "isUnique": false
2821
2670
  }
2822
2671
  },
@@ -2902,9 +2751,7 @@
2902
2751
  "indexes": {
2903
2752
  "idx_organizations_tenant_id": {
2904
2753
  "name": "idx_organizations_tenant_id",
2905
- "columns": [
2906
- "tenant_id"
2907
- ],
2754
+ "columns": ["tenant_id"],
2908
2755
  "isUnique": false
2909
2756
  }
2910
2757
  },
@@ -2962,32 +2809,22 @@
2962
2809
  "indexes": {
2963
2810
  "user_organizations_unique": {
2964
2811
  "name": "user_organizations_unique",
2965
- "columns": [
2966
- "tenant_id",
2967
- "user_id",
2968
- "organization_id"
2969
- ],
2812
+ "columns": ["tenant_id", "user_id", "organization_id"],
2970
2813
  "isUnique": true
2971
2814
  },
2972
2815
  "idx_user_organizations_tenant_id": {
2973
2816
  "name": "idx_user_organizations_tenant_id",
2974
- "columns": [
2975
- "tenant_id"
2976
- ],
2817
+ "columns": ["tenant_id"],
2977
2818
  "isUnique": false
2978
2819
  },
2979
2820
  "idx_user_organizations_user_id": {
2980
2821
  "name": "idx_user_organizations_user_id",
2981
- "columns": [
2982
- "user_id"
2983
- ],
2822
+ "columns": ["user_id"],
2984
2823
  "isUnique": false
2985
2824
  },
2986
2825
  "idx_user_organizations_organization_id": {
2987
2826
  "name": "idx_user_organizations_organization_id",
2988
- "columns": [
2989
- "organization_id"
2990
- ],
2827
+ "columns": ["organization_id"],
2991
2828
  "isUnique": false
2992
2829
  }
2993
2830
  },
@@ -3124,10 +2961,7 @@
3124
2961
  "foreignKeys": {},
3125
2962
  "compositePrimaryKeys": {
3126
2963
  "resource_servers_pk": {
3127
- "columns": [
3128
- "tenant_id",
3129
- "id"
3130
- ],
2964
+ "columns": ["tenant_id", "id"],
3131
2965
  "name": "resource_servers_pk"
3132
2966
  }
3133
2967
  },
@@ -3176,10 +3010,7 @@
3176
3010
  "indexes": {
3177
3011
  "role_permissions_role_fk": {
3178
3012
  "name": "role_permissions_role_fk",
3179
- "columns": [
3180
- "tenant_id",
3181
- "role_id"
3182
- ],
3013
+ "columns": ["tenant_id", "role_id"],
3183
3014
  "isUnique": false
3184
3015
  },
3185
3016
  "role_permissions_permission_fk": {
@@ -3272,10 +3103,7 @@
3272
3103
  "foreignKeys": {},
3273
3104
  "compositePrimaryKeys": {
3274
3105
  "roles_pk": {
3275
- "columns": [
3276
- "tenant_id",
3277
- "id"
3278
- ],
3106
+ "columns": ["tenant_id", "id"],
3279
3107
  "name": "roles_pk"
3280
3108
  }
3281
3109
  },
@@ -3332,10 +3160,7 @@
3332
3160
  "indexes": {
3333
3161
  "user_permissions_user_fk": {
3334
3162
  "name": "user_permissions_user_fk",
3335
- "columns": [
3336
- "tenant_id",
3337
- "user_id"
3338
- ],
3163
+ "columns": ["tenant_id", "user_id"],
3339
3164
  "isUnique": false
3340
3165
  },
3341
3166
  "user_permissions_permission_fk": {
@@ -3349,9 +3174,7 @@
3349
3174
  },
3350
3175
  "user_permissions_organization_fk": {
3351
3176
  "name": "user_permissions_organization_fk",
3352
- "columns": [
3353
- "organization_id"
3354
- ],
3177
+ "columns": ["organization_id"],
3355
3178
  "isUnique": false
3356
3179
  }
3357
3180
  },
@@ -3414,37 +3237,24 @@
3414
3237
  "indexes": {
3415
3238
  "user_roles_user_fk": {
3416
3239
  "name": "user_roles_user_fk",
3417
- "columns": [
3418
- "tenant_id",
3419
- "user_id"
3420
- ],
3240
+ "columns": ["tenant_id", "user_id"],
3421
3241
  "isUnique": false
3422
3242
  },
3423
3243
  "user_roles_role_fk": {
3424
3244
  "name": "user_roles_role_fk",
3425
- "columns": [
3426
- "tenant_id",
3427
- "role_id"
3428
- ],
3245
+ "columns": ["tenant_id", "role_id"],
3429
3246
  "isUnique": false
3430
3247
  },
3431
3248
  "user_roles_organization_fk": {
3432
3249
  "name": "user_roles_organization_fk",
3433
- "columns": [
3434
- "organization_id"
3435
- ],
3250
+ "columns": ["organization_id"],
3436
3251
  "isUnique": false
3437
3252
  }
3438
3253
  },
3439
3254
  "foreignKeys": {},
3440
3255
  "compositePrimaryKeys": {
3441
3256
  "user_roles_pk": {
3442
- "columns": [
3443
- "tenant_id",
3444
- "user_id",
3445
- "role_id",
3446
- "organization_id"
3447
- ],
3257
+ "columns": ["tenant_id", "user_id", "role_id", "organization_id"],
3448
3258
  "name": "user_roles_pk"
3449
3259
  }
3450
3260
  },
@@ -3524,12 +3334,8 @@
3524
3334
  "name": "branding_tenant_id_tenants_id_fk",
3525
3335
  "tableFrom": "branding",
3526
3336
  "tableTo": "tenants",
3527
- "columnsFrom": [
3528
- "tenant_id"
3529
- ],
3530
- "columnsTo": [
3531
- "id"
3532
- ],
3337
+ "columnsFrom": ["tenant_id"],
3338
+ "columnsTo": ["id"],
3533
3339
  "onDelete": "cascade",
3534
3340
  "onUpdate": "no action"
3535
3341
  }
@@ -3590,23 +3396,15 @@
3590
3396
  "name": "custom_text_tenant_id_tenants_id_fk",
3591
3397
  "tableFrom": "custom_text",
3592
3398
  "tableTo": "tenants",
3593
- "columnsFrom": [
3594
- "tenant_id"
3595
- ],
3596
- "columnsTo": [
3597
- "id"
3598
- ],
3399
+ "columnsFrom": ["tenant_id"],
3400
+ "columnsTo": ["id"],
3599
3401
  "onDelete": "cascade",
3600
3402
  "onUpdate": "no action"
3601
3403
  }
3602
3404
  },
3603
3405
  "compositePrimaryKeys": {
3604
3406
  "custom_text_tenant_id_prompt_language_pk": {
3605
- "columns": [
3606
- "tenant_id",
3607
- "prompt",
3608
- "language"
3609
- ],
3407
+ "columns": ["tenant_id", "prompt", "language"],
3610
3408
  "name": "custom_text_tenant_id_prompt_language_pk"
3611
3409
  }
3612
3410
  },
@@ -3730,9 +3528,7 @@
3730
3528
  "indexes": {
3731
3529
  "flows_tenant_id_idx": {
3732
3530
  "name": "flows_tenant_id_idx",
3733
- "columns": [
3734
- "tenant_id"
3735
- ],
3531
+ "columns": ["tenant_id"],
3736
3532
  "isUnique": false
3737
3533
  }
3738
3534
  },
@@ -3741,12 +3537,8 @@
3741
3537
  "name": "flows_tenant_id_tenants_id_fk",
3742
3538
  "tableFrom": "flows",
3743
3539
  "tableTo": "tenants",
3744
- "columnsFrom": [
3745
- "tenant_id"
3746
- ],
3747
- "columnsTo": [
3748
- "id"
3749
- ],
3540
+ "columnsFrom": ["tenant_id"],
3541
+ "columnsTo": ["id"],
3750
3542
  "onDelete": "cascade",
3751
3543
  "onUpdate": "no action"
3752
3544
  }
@@ -3846,9 +3638,7 @@
3846
3638
  "indexes": {
3847
3639
  "forms_tenant_id_idx": {
3848
3640
  "name": "forms_tenant_id_idx",
3849
- "columns": [
3850
- "tenant_id"
3851
- ],
3641
+ "columns": ["tenant_id"],
3852
3642
  "isUnique": false
3853
3643
  }
3854
3644
  },
@@ -3857,12 +3647,8 @@
3857
3647
  "name": "forms_tenant_id_tenants_id_fk",
3858
3648
  "tableFrom": "forms",
3859
3649
  "tableTo": "tenants",
3860
- "columnsFrom": [
3861
- "tenant_id"
3862
- ],
3863
- "columnsTo": [
3864
- "id"
3865
- ],
3650
+ "columnsFrom": ["tenant_id"],
3651
+ "columnsTo": ["id"],
3866
3652
  "onDelete": "cascade",
3867
3653
  "onUpdate": "no action"
3868
3654
  }
@@ -3920,9 +3706,7 @@
3920
3706
  "indexes": {
3921
3707
  "hook_code_tenant_id_idx": {
3922
3708
  "name": "hook_code_tenant_id_idx",
3923
- "columns": [
3924
- "tenant_id"
3925
- ],
3709
+ "columns": ["tenant_id"],
3926
3710
  "isUnique": false
3927
3711
  }
3928
3712
  },
@@ -3931,12 +3715,8 @@
3931
3715
  "name": "hook_code_tenant_id_tenants_id_fk",
3932
3716
  "tableFrom": "hook_code",
3933
3717
  "tableTo": "tenants",
3934
- "columnsFrom": [
3935
- "tenant_id"
3936
- ],
3937
- "columnsTo": [
3938
- "id"
3939
- ],
3718
+ "columnsFrom": ["tenant_id"],
3719
+ "columnsTo": ["id"],
3940
3720
  "onDelete": "cascade",
3941
3721
  "onUpdate": "no action"
3942
3722
  }
@@ -4037,9 +3817,7 @@
4037
3817
  "indexes": {
4038
3818
  "hooks_tenant_id_idx": {
4039
3819
  "name": "hooks_tenant_id_idx",
4040
- "columns": [
4041
- "tenant_id"
4042
- ],
3820
+ "columns": ["tenant_id"],
4043
3821
  "isUnique": false
4044
3822
  }
4045
3823
  },
@@ -4048,12 +3826,8 @@
4048
3826
  "name": "hooks_tenant_id_tenants_id_fk",
4049
3827
  "tableFrom": "hooks",
4050
3828
  "tableTo": "tenants",
4051
- "columnsFrom": [
4052
- "tenant_id"
4053
- ],
4054
- "columnsTo": [
4055
- "id"
4056
- ],
3829
+ "columnsFrom": ["tenant_id"],
3830
+ "columnsTo": ["id"],
4057
3831
  "onDelete": "cascade",
4058
3832
  "onUpdate": "no action"
4059
3833
  }
@@ -4157,12 +3931,8 @@
4157
3931
  "name": "keys_tenant_id_tenants_id_fk",
4158
3932
  "tableFrom": "keys",
4159
3933
  "tableTo": "tenants",
4160
- "columnsFrom": [
4161
- "tenant_id"
4162
- ],
4163
- "columnsTo": [
4164
- "id"
4165
- ],
3934
+ "columnsFrom": ["tenant_id"],
3935
+ "columnsTo": ["id"],
4166
3936
  "onDelete": "cascade",
4167
3937
  "onUpdate": "no action"
4168
3938
  },
@@ -4170,12 +3940,8 @@
4170
3940
  "name": "keys_connection_connections_id_fk",
4171
3941
  "tableFrom": "keys",
4172
3942
  "tableTo": "connections",
4173
- "columnsFrom": [
4174
- "connection"
4175
- ],
4176
- "columnsTo": [
4177
- "id"
4178
- ],
3943
+ "columnsFrom": ["connection"],
3944
+ "columnsTo": ["id"],
4179
3945
  "onDelete": "cascade",
4180
3946
  "onUpdate": "no action"
4181
3947
  }
@@ -4632,9 +4398,7 @@
4632
4398
  "indexes": {
4633
4399
  "themes_tenant_id_idx": {
4634
4400
  "name": "themes_tenant_id_idx",
4635
- "columns": [
4636
- "tenant_id"
4637
- ],
4401
+ "columns": ["tenant_id"],
4638
4402
  "isUnique": false
4639
4403
  }
4640
4404
  },
@@ -4643,22 +4407,15 @@
4643
4407
  "name": "themes_tenant_id_tenants_id_fk",
4644
4408
  "tableFrom": "themes",
4645
4409
  "tableTo": "tenants",
4646
- "columnsFrom": [
4647
- "tenant_id"
4648
- ],
4649
- "columnsTo": [
4650
- "id"
4651
- ],
4410
+ "columnsFrom": ["tenant_id"],
4411
+ "columnsTo": ["id"],
4652
4412
  "onDelete": "cascade",
4653
4413
  "onUpdate": "no action"
4654
4414
  }
4655
4415
  },
4656
4416
  "compositePrimaryKeys": {
4657
4417
  "themes_pkey": {
4658
- "columns": [
4659
- "tenant_id",
4660
- "themeId"
4661
- ],
4418
+ "columns": ["tenant_id", "themeId"],
4662
4419
  "name": "themes_pkey"
4663
4420
  }
4664
4421
  },
@@ -4703,12 +4460,8 @@
4703
4460
  "name": "universal_login_templates_tenant_id_tenants_id_fk",
4704
4461
  "tableFrom": "universal_login_templates",
4705
4462
  "tableTo": "tenants",
4706
- "columnsFrom": [
4707
- "tenant_id"
4708
- ],
4709
- "columnsTo": [
4710
- "id"
4711
- ],
4463
+ "columnsFrom": ["tenant_id"],
4464
+ "columnsTo": ["id"],
4712
4465
  "onDelete": "cascade",
4713
4466
  "onUpdate": "no action"
4714
4467
  }
@@ -4830,17 +4583,12 @@
4830
4583
  "indexes": {
4831
4584
  "authentication_methods_tenant_user_idx": {
4832
4585
  "name": "authentication_methods_tenant_user_idx",
4833
- "columns": [
4834
- "tenant_id",
4835
- "user_id"
4836
- ],
4586
+ "columns": ["tenant_id", "user_id"],
4837
4587
  "isUnique": false
4838
4588
  },
4839
4589
  "authentication_methods_credential_id_idx": {
4840
4590
  "name": "authentication_methods_credential_id_idx",
4841
- "columns": [
4842
- "credential_id"
4843
- ],
4591
+ "columns": ["credential_id"],
4844
4592
  "isUnique": false
4845
4593
  }
4846
4594
  },
@@ -4849,12 +4597,8 @@
4849
4597
  "name": "authentication_methods_tenant_id_tenants_id_fk",
4850
4598
  "tableFrom": "authentication_methods",
4851
4599
  "tableTo": "tenants",
4852
- "columnsFrom": [
4853
- "tenant_id"
4854
- ],
4855
- "columnsTo": [
4856
- "id"
4857
- ],
4600
+ "columnsFrom": ["tenant_id"],
4601
+ "columnsTo": ["id"],
4858
4602
  "onDelete": "cascade",
4859
4603
  "onUpdate": "no action"
4860
4604
  }
@@ -5073,33 +4817,22 @@
5073
4817
  "indexes": {
5074
4818
  "logs_user_id": {
5075
4819
  "name": "logs_user_id",
5076
- "columns": [
5077
- "user_id"
5078
- ],
4820
+ "columns": ["user_id"],
5079
4821
  "isUnique": false
5080
4822
  },
5081
4823
  "logs_tenant_id": {
5082
4824
  "name": "logs_tenant_id",
5083
- "columns": [
5084
- "tenant_id"
5085
- ],
4825
+ "columns": ["tenant_id"],
5086
4826
  "isUnique": false
5087
4827
  },
5088
4828
  "logs_date": {
5089
4829
  "name": "logs_date",
5090
- "columns": [
5091
- "date"
5092
- ],
4830
+ "columns": ["date"],
5093
4831
  "isUnique": false
5094
4832
  },
5095
4833
  "IDX_logs_tenant_date_type_user": {
5096
4834
  "name": "IDX_logs_tenant_date_type_user",
5097
- "columns": [
5098
- "tenant_id",
5099
- "date",
5100
- "type",
5101
- "user_id"
5102
- ],
4835
+ "columns": ["tenant_id", "date", "type", "user_id"],
5103
4836
  "isUnique": false
5104
4837
  }
5105
4838
  },
@@ -5228,31 +4961,22 @@
5228
4961
  "indexes": {
5229
4962
  "idx_outbox_events_tenant_id": {
5230
4963
  "name": "idx_outbox_events_tenant_id",
5231
- "columns": [
5232
- "tenant_id"
5233
- ],
4964
+ "columns": ["tenant_id"],
5234
4965
  "isUnique": false
5235
4966
  },
5236
4967
  "idx_outbox_events_processed_at": {
5237
4968
  "name": "idx_outbox_events_processed_at",
5238
- "columns": [
5239
- "processed_at"
5240
- ],
4969
+ "columns": ["processed_at"],
5241
4970
  "isUnique": false
5242
4971
  },
5243
4972
  "idx_outbox_events_claimed_by": {
5244
4973
  "name": "idx_outbox_events_claimed_by",
5245
- "columns": [
5246
- "claimed_by"
5247
- ],
4974
+ "columns": ["claimed_by"],
5248
4975
  "isUnique": false
5249
4976
  },
5250
4977
  "idx_outbox_events_tenant_dead_lettered": {
5251
4978
  "name": "idx_outbox_events_tenant_dead_lettered",
5252
- "columns": [
5253
- "tenant_id",
5254
- "dead_lettered_at"
5255
- ],
4979
+ "columns": ["tenant_id", "dead_lettered_at"],
5256
4980
  "isUnique": false
5257
4981
  }
5258
4982
  },
@@ -5261,12 +4985,8 @@
5261
4985
  "name": "outbox_events_tenant_id_tenants_id_fk",
5262
4986
  "tableFrom": "outbox_events",
5263
4987
  "tableTo": "tenants",
5264
- "columnsFrom": [
5265
- "tenant_id"
5266
- ],
5267
- "columnsTo": [
5268
- "id"
5269
- ],
4988
+ "columnsFrom": ["tenant_id"],
4989
+ "columnsTo": ["id"],
5270
4990
  "onDelete": "cascade",
5271
4991
  "onUpdate": "no action"
5272
4992
  }
@@ -5286,4 +5006,4 @@
5286
5006
  "internal": {
5287
5007
  "indexes": {}
5288
5008
  }
5289
- }
5009
+ }