@authhero/drizzle 0.47.0 → 0.49.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.
@@ -390,12 +390,8 @@
390
390
  "name": "passwords_tenant_id_tenants_id_fk",
391
391
  "tableFrom": "passwords",
392
392
  "tableTo": "tenants",
393
- "columnsFrom": [
394
- "tenant_id"
395
- ],
396
- "columnsTo": [
397
- "id"
398
- ],
393
+ "columnsFrom": ["tenant_id"],
394
+ "columnsTo": ["id"],
399
395
  "onDelete": "cascade",
400
396
  "onUpdate": "no action"
401
397
  }
@@ -658,59 +654,37 @@
658
654
  "indexes": {
659
655
  "unique_email_provider": {
660
656
  "name": "unique_email_provider",
661
- "columns": [
662
- "email",
663
- "provider",
664
- "tenant_id"
665
- ],
657
+ "columns": ["email", "provider", "tenant_id"],
666
658
  "isUnique": true
667
659
  },
668
660
  "unique_phone_provider": {
669
661
  "name": "unique_phone_provider",
670
- "columns": [
671
- "phone_number",
672
- "provider",
673
- "tenant_id"
674
- ],
662
+ "columns": ["phone_number", "provider", "tenant_id"],
675
663
  "isUnique": true
676
664
  },
677
665
  "unique_username_provider": {
678
666
  "name": "unique_username_provider",
679
- "columns": [
680
- "username",
681
- "provider",
682
- "tenant_id"
683
- ],
667
+ "columns": ["username", "provider", "tenant_id"],
684
668
  "isUnique": true
685
669
  },
686
670
  "users_email_index": {
687
671
  "name": "users_email_index",
688
- "columns": [
689
- "email"
690
- ],
672
+ "columns": ["email"],
691
673
  "isUnique": false
692
674
  },
693
675
  "users_linked_to_index": {
694
676
  "name": "users_linked_to_index",
695
- "columns": [
696
- "linked_to"
697
- ],
677
+ "columns": ["linked_to"],
698
678
  "isUnique": false
699
679
  },
700
680
  "users_name_index": {
701
681
  "name": "users_name_index",
702
- "columns": [
703
- "name"
704
- ],
682
+ "columns": ["name"],
705
683
  "isUnique": false
706
684
  },
707
685
  "users_phone_tenant_provider_index": {
708
686
  "name": "users_phone_tenant_provider_index",
709
- "columns": [
710
- "tenant_id",
711
- "phone_number",
712
- "provider"
713
- ],
687
+ "columns": ["tenant_id", "phone_number", "provider"],
714
688
  "isUnique": false
715
689
  }
716
690
  },
@@ -719,22 +693,15 @@
719
693
  "name": "users_tenant_id_tenants_id_fk",
720
694
  "tableFrom": "users",
721
695
  "tableTo": "tenants",
722
- "columnsFrom": [
723
- "tenant_id"
724
- ],
725
- "columnsTo": [
726
- "id"
727
- ],
696
+ "columnsFrom": ["tenant_id"],
697
+ "columnsTo": ["id"],
728
698
  "onDelete": "cascade",
729
699
  "onUpdate": "no action"
730
700
  }
731
701
  },
732
702
  "compositePrimaryKeys": {
733
703
  "users_tenants": {
734
- "columns": [
735
- "user_id",
736
- "tenant_id"
737
- ],
704
+ "columns": ["user_id", "tenant_id"],
738
705
  "name": "users_tenants"
739
706
  }
740
707
  },
@@ -842,12 +809,8 @@
842
809
  "name": "authentication_codes_tenant_id_tenants_id_fk",
843
810
  "tableFrom": "authentication_codes",
844
811
  "tableTo": "tenants",
845
- "columnsFrom": [
846
- "tenant_id"
847
- ],
848
- "columnsTo": [
849
- "id"
850
- ],
812
+ "columnsFrom": ["tenant_id"],
813
+ "columnsTo": ["id"],
851
814
  "onDelete": "cascade",
852
815
  "onUpdate": "no action"
853
816
  }
@@ -968,9 +931,7 @@
968
931
  "indexes": {
969
932
  "codes_expires_at_index": {
970
933
  "name": "codes_expires_at_index",
971
- "columns": [
972
- "expires_at"
973
- ],
934
+ "columns": ["expires_at"],
974
935
  "isUnique": false
975
936
  }
976
937
  },
@@ -979,22 +940,15 @@
979
940
  "name": "codes_tenant_id_tenants_id_fk",
980
941
  "tableFrom": "codes",
981
942
  "tableTo": "tenants",
982
- "columnsFrom": [
983
- "tenant_id"
984
- ],
985
- "columnsTo": [
986
- "id"
987
- ],
943
+ "columnsFrom": ["tenant_id"],
944
+ "columnsTo": ["id"],
988
945
  "onDelete": "cascade",
989
946
  "onUpdate": "no action"
990
947
  }
991
948
  },
992
949
  "compositePrimaryKeys": {
993
950
  "PK_codes_code_id_code_type": {
994
- "columns": [
995
- "code_id",
996
- "code_type"
997
- ],
951
+ "columns": ["code_id", "code_type"],
998
952
  "name": "PK_codes_code_id_code_type"
999
953
  }
1000
954
  },
@@ -1149,39 +1103,27 @@
1149
1103
  "indexes": {
1150
1104
  "login_sessions_id_index": {
1151
1105
  "name": "login_sessions_id_index",
1152
- "columns": [
1153
- "id"
1154
- ],
1106
+ "columns": ["id"],
1155
1107
  "isUnique": false
1156
1108
  },
1157
1109
  "login_sessions_state_idx": {
1158
1110
  "name": "login_sessions_state_idx",
1159
- "columns": [
1160
- "state"
1161
- ],
1111
+ "columns": ["state"],
1162
1112
  "isUnique": false
1163
1113
  },
1164
1114
  "login_sessions_state_updated_idx": {
1165
1115
  "name": "login_sessions_state_updated_idx",
1166
- "columns": [
1167
- "state",
1168
- "updated_at_ts"
1169
- ],
1116
+ "columns": ["state", "updated_at_ts"],
1170
1117
  "isUnique": false
1171
1118
  },
1172
1119
  "login_sessions_tenant_user_idx": {
1173
1120
  "name": "login_sessions_tenant_user_idx",
1174
- "columns": [
1175
- "tenant_id",
1176
- "user_id"
1177
- ],
1121
+ "columns": ["tenant_id", "user_id"],
1178
1122
  "isUnique": false
1179
1123
  },
1180
1124
  "idx_login_sessions_expires_at_ts": {
1181
1125
  "name": "idx_login_sessions_expires_at_ts",
1182
- "columns": [
1183
- "expires_at_ts"
1184
- ],
1126
+ "columns": ["expires_at_ts"],
1185
1127
  "isUnique": false
1186
1128
  }
1187
1129
  },
@@ -1190,22 +1132,15 @@
1190
1132
  "name": "login_sessions_tenant_id_tenants_id_fk",
1191
1133
  "tableFrom": "login_sessions",
1192
1134
  "tableTo": "tenants",
1193
- "columnsFrom": [
1194
- "tenant_id"
1195
- ],
1196
- "columnsTo": [
1197
- "id"
1198
- ],
1135
+ "columnsFrom": ["tenant_id"],
1136
+ "columnsTo": ["id"],
1199
1137
  "onDelete": "cascade",
1200
1138
  "onUpdate": "no action"
1201
1139
  }
1202
1140
  },
1203
1141
  "compositePrimaryKeys": {
1204
1142
  "login_sessions_pk": {
1205
- "columns": [
1206
- "tenant_id",
1207
- "id"
1208
- ],
1143
+ "columns": ["tenant_id", "id"],
1209
1144
  "name": "login_sessions_pk"
1210
1145
  }
1211
1146
  },
@@ -1345,16 +1280,12 @@
1345
1280
  "indexes": {
1346
1281
  "otps_email_index": {
1347
1282
  "name": "otps_email_index",
1348
- "columns": [
1349
- "email"
1350
- ],
1283
+ "columns": ["email"],
1351
1284
  "isUnique": false
1352
1285
  },
1353
1286
  "otps_expires_at_index": {
1354
1287
  "name": "otps_expires_at_index",
1355
- "columns": [
1356
- "expires_at"
1357
- ],
1288
+ "columns": ["expires_at"],
1358
1289
  "isUnique": false
1359
1290
  }
1360
1291
  },
@@ -1363,12 +1294,8 @@
1363
1294
  "name": "otps_tenant_id_tenants_id_fk",
1364
1295
  "tableFrom": "otps",
1365
1296
  "tableTo": "tenants",
1366
- "columnsFrom": [
1367
- "tenant_id"
1368
- ],
1369
- "columnsTo": [
1370
- "id"
1371
- ],
1297
+ "columnsFrom": ["tenant_id"],
1298
+ "columnsTo": ["id"],
1372
1299
  "onDelete": "cascade",
1373
1300
  "onUpdate": "no action"
1374
1301
  }
@@ -1510,40 +1437,27 @@
1510
1437
  "indexes": {
1511
1438
  "idx_refresh_tokens_user_id": {
1512
1439
  "name": "idx_refresh_tokens_user_id",
1513
- "columns": [
1514
- "tenant_id",
1515
- "user_id"
1516
- ],
1440
+ "columns": ["tenant_id", "user_id"],
1517
1441
  "isUnique": false
1518
1442
  },
1519
1443
  "idx_refresh_tokens_login_id": {
1520
1444
  "name": "idx_refresh_tokens_login_id",
1521
- "columns": [
1522
- "login_id"
1523
- ],
1445
+ "columns": ["login_id"],
1524
1446
  "isUnique": false
1525
1447
  },
1526
1448
  "idx_refresh_tokens_expires_at_ts": {
1527
1449
  "name": "idx_refresh_tokens_expires_at_ts",
1528
- "columns": [
1529
- "expires_at_ts"
1530
- ],
1450
+ "columns": ["expires_at_ts"],
1531
1451
  "isUnique": false
1532
1452
  },
1533
1453
  "idx_refresh_tokens_token_lookup": {
1534
1454
  "name": "idx_refresh_tokens_token_lookup",
1535
- "columns": [
1536
- "tenant_id",
1537
- "token_lookup"
1538
- ],
1455
+ "columns": ["tenant_id", "token_lookup"],
1539
1456
  "isUnique": false
1540
1457
  },
1541
1458
  "idx_refresh_tokens_family_id": {
1542
1459
  "name": "idx_refresh_tokens_family_id",
1543
- "columns": [
1544
- "tenant_id",
1545
- "family_id"
1546
- ],
1460
+ "columns": ["tenant_id", "family_id"],
1547
1461
  "isUnique": false
1548
1462
  }
1549
1463
  },
@@ -1552,22 +1466,15 @@
1552
1466
  "name": "refresh_tokens_tenant_id_tenants_id_fk",
1553
1467
  "tableFrom": "refresh_tokens",
1554
1468
  "tableTo": "tenants",
1555
- "columnsFrom": [
1556
- "tenant_id"
1557
- ],
1558
- "columnsTo": [
1559
- "id"
1560
- ],
1469
+ "columnsFrom": ["tenant_id"],
1470
+ "columnsTo": ["id"],
1561
1471
  "onDelete": "cascade",
1562
1472
  "onUpdate": "no action"
1563
1473
  }
1564
1474
  },
1565
1475
  "compositePrimaryKeys": {
1566
1476
  "refresh_tokens_pk": {
1567
- "columns": [
1568
- "tenant_id",
1569
- "id"
1570
- ],
1477
+ "columns": ["tenant_id", "id"],
1571
1478
  "name": "refresh_tokens_pk"
1572
1479
  }
1573
1480
  },
@@ -1679,24 +1586,17 @@
1679
1586
  "indexes": {
1680
1587
  "IDX_sessions_login_session_id": {
1681
1588
  "name": "IDX_sessions_login_session_id",
1682
- "columns": [
1683
- "login_session_id"
1684
- ],
1589
+ "columns": ["login_session_id"],
1685
1590
  "isUnique": false
1686
1591
  },
1687
1592
  "idx_sessions_user_id": {
1688
1593
  "name": "idx_sessions_user_id",
1689
- "columns": [
1690
- "tenant_id",
1691
- "user_id"
1692
- ],
1594
+ "columns": ["tenant_id", "user_id"],
1693
1595
  "isUnique": false
1694
1596
  },
1695
1597
  "idx_sessions_expires_at_ts": {
1696
1598
  "name": "idx_sessions_expires_at_ts",
1697
- "columns": [
1698
- "expires_at_ts"
1699
- ],
1599
+ "columns": ["expires_at_ts"],
1700
1600
  "isUnique": false
1701
1601
  }
1702
1602
  },
@@ -1705,22 +1605,15 @@
1705
1605
  "name": "sessions_tenant_id_tenants_id_fk",
1706
1606
  "tableFrom": "sessions",
1707
1607
  "tableTo": "tenants",
1708
- "columnsFrom": [
1709
- "tenant_id"
1710
- ],
1711
- "columnsTo": [
1712
- "id"
1713
- ],
1608
+ "columnsFrom": ["tenant_id"],
1609
+ "columnsTo": ["id"],
1714
1610
  "onDelete": "cascade",
1715
1611
  "onUpdate": "no action"
1716
1612
  }
1717
1613
  },
1718
1614
  "compositePrimaryKeys": {
1719
1615
  "sessions_pk": {
1720
- "columns": [
1721
- "tenant_id",
1722
- "id"
1723
- ],
1616
+ "columns": ["tenant_id", "id"],
1724
1617
  "name": "sessions_pk"
1725
1618
  }
1726
1619
  },
@@ -1828,12 +1721,8 @@
1828
1721
  "name": "tickets_tenant_id_tenants_id_fk",
1829
1722
  "tableFrom": "tickets",
1830
1723
  "tableTo": "tenants",
1831
- "columnsFrom": [
1832
- "tenant_id"
1833
- ],
1834
- "columnsTo": [
1835
- "id"
1836
- ],
1724
+ "columnsFrom": ["tenant_id"],
1725
+ "columnsTo": ["id"],
1837
1726
  "onDelete": "cascade",
1838
1727
  "onUpdate": "no action"
1839
1728
  }
@@ -1937,9 +1826,7 @@
1937
1826
  "indexes": {
1938
1827
  "idx_client_grants_audience": {
1939
1828
  "name": "idx_client_grants_audience",
1940
- "columns": [
1941
- "audience"
1942
- ],
1829
+ "columns": ["audience"],
1943
1830
  "isUnique": false
1944
1831
  }
1945
1832
  },
@@ -1948,22 +1835,15 @@
1948
1835
  "name": "client_grants_tenant_id_tenants_id_fk",
1949
1836
  "tableFrom": "client_grants",
1950
1837
  "tableTo": "tenants",
1951
- "columnsFrom": [
1952
- "tenant_id"
1953
- ],
1954
- "columnsTo": [
1955
- "id"
1956
- ],
1838
+ "columnsFrom": ["tenant_id"],
1839
+ "columnsTo": ["id"],
1957
1840
  "onDelete": "cascade",
1958
1841
  "onUpdate": "no action"
1959
1842
  }
1960
1843
  },
1961
1844
  "compositePrimaryKeys": {
1962
1845
  "pk_client_grants": {
1963
- "columns": [
1964
- "tenant_id",
1965
- "id"
1966
- ],
1846
+ "columns": ["tenant_id", "id"],
1967
1847
  "name": "pk_client_grants"
1968
1848
  }
1969
1849
  },
@@ -2062,18 +1942,12 @@
2062
1942
  "indexes": {
2063
1943
  "idx_client_registration_tokens_hash": {
2064
1944
  "name": "idx_client_registration_tokens_hash",
2065
- "columns": [
2066
- "tenant_id",
2067
- "token_hash"
2068
- ],
1945
+ "columns": ["tenant_id", "token_hash"],
2069
1946
  "isUnique": true
2070
1947
  },
2071
1948
  "idx_client_registration_tokens_client": {
2072
1949
  "name": "idx_client_registration_tokens_client",
2073
- "columns": [
2074
- "tenant_id",
2075
- "client_id"
2076
- ],
1950
+ "columns": ["tenant_id", "client_id"],
2077
1951
  "isUnique": false
2078
1952
  }
2079
1953
  },
@@ -2082,12 +1956,8 @@
2082
1956
  "name": "client_registration_tokens_tenant_id_tenants_id_fk",
2083
1957
  "tableFrom": "client_registration_tokens",
2084
1958
  "tableTo": "tenants",
2085
- "columnsFrom": [
2086
- "tenant_id"
2087
- ],
2088
- "columnsTo": [
2089
- "id"
2090
- ],
1959
+ "columnsFrom": ["tenant_id"],
1960
+ "columnsTo": ["id"],
2091
1961
  "onDelete": "cascade",
2092
1962
  "onUpdate": "no action"
2093
1963
  }
@@ -2503,10 +2373,7 @@
2503
2373
  "indexes": {
2504
2374
  "idx_clients_owner_user_id": {
2505
2375
  "name": "idx_clients_owner_user_id",
2506
- "columns": [
2507
- "tenant_id",
2508
- "owner_user_id"
2509
- ],
2376
+ "columns": ["tenant_id", "owner_user_id"],
2510
2377
  "isUnique": false
2511
2378
  }
2512
2379
  },
@@ -2515,22 +2382,15 @@
2515
2382
  "name": "clients_tenant_id_tenants_id_fk",
2516
2383
  "tableFrom": "clients",
2517
2384
  "tableTo": "tenants",
2518
- "columnsFrom": [
2519
- "tenant_id"
2520
- ],
2521
- "columnsTo": [
2522
- "id"
2523
- ],
2385
+ "columnsFrom": ["tenant_id"],
2386
+ "columnsTo": ["id"],
2524
2387
  "onDelete": "cascade",
2525
2388
  "onUpdate": "no action"
2526
2389
  }
2527
2390
  },
2528
2391
  "compositePrimaryKeys": {
2529
2392
  "clients_tenant_id_client_id": {
2530
- "columns": [
2531
- "tenant_id",
2532
- "client_id"
2533
- ],
2393
+ "columns": ["tenant_id", "client_id"],
2534
2394
  "name": "clients_tenant_id_client_id"
2535
2395
  }
2536
2396
  },
@@ -2644,16 +2504,12 @@
2644
2504
  "indexes": {
2645
2505
  "connections_tenant_id_index": {
2646
2506
  "name": "connections_tenant_id_index",
2647
- "columns": [
2648
- "tenant_id"
2649
- ],
2507
+ "columns": ["tenant_id"],
2650
2508
  "isUnique": false
2651
2509
  },
2652
2510
  "connections_id_unique": {
2653
2511
  "name": "connections_id_unique",
2654
- "columns": [
2655
- "id"
2656
- ],
2512
+ "columns": ["id"],
2657
2513
  "isUnique": true
2658
2514
  }
2659
2515
  },
@@ -2662,22 +2518,15 @@
2662
2518
  "name": "connections_tenant_id_tenants_id_fk",
2663
2519
  "tableFrom": "connections",
2664
2520
  "tableTo": "tenants",
2665
- "columnsFrom": [
2666
- "tenant_id"
2667
- ],
2668
- "columnsTo": [
2669
- "id"
2670
- ],
2521
+ "columnsFrom": ["tenant_id"],
2522
+ "columnsTo": ["id"],
2671
2523
  "onDelete": "cascade",
2672
2524
  "onUpdate": "no action"
2673
2525
  }
2674
2526
  },
2675
2527
  "compositePrimaryKeys": {
2676
2528
  "connections_tenant_id_id_pk": {
2677
- "columns": [
2678
- "tenant_id",
2679
- "id"
2680
- ],
2529
+ "columns": ["tenant_id", "id"],
2681
2530
  "name": "connections_tenant_id_id_pk"
2682
2531
  }
2683
2532
  },
@@ -2782,9 +2631,7 @@
2782
2631
  "indexes": {
2783
2632
  "custom_domains_domain_unique": {
2784
2633
  "name": "custom_domains_domain_unique",
2785
- "columns": [
2786
- "domain"
2787
- ],
2634
+ "columns": ["domain"],
2788
2635
  "isUnique": true
2789
2636
  }
2790
2637
  },
@@ -2793,12 +2640,8 @@
2793
2640
  "name": "custom_domains_tenant_id_tenants_id_fk",
2794
2641
  "tableFrom": "custom_domains",
2795
2642
  "tableTo": "tenants",
2796
- "columnsFrom": [
2797
- "tenant_id"
2798
- ],
2799
- "columnsTo": [
2800
- "id"
2801
- ],
2643
+ "columnsFrom": ["tenant_id"],
2644
+ "columnsTo": ["id"],
2802
2645
  "onDelete": "cascade",
2803
2646
  "onUpdate": "no action"
2804
2647
  }
@@ -2880,12 +2723,8 @@
2880
2723
  "name": "domains_tenant_id_tenants_id_fk",
2881
2724
  "tableFrom": "domains",
2882
2725
  "tableTo": "tenants",
2883
- "columnsFrom": [
2884
- "tenant_id"
2885
- ],
2886
- "columnsTo": [
2887
- "id"
2888
- ],
2726
+ "columnsFrom": ["tenant_id"],
2727
+ "columnsTo": ["id"],
2889
2728
  "onDelete": "cascade",
2890
2729
  "onUpdate": "no action"
2891
2730
  }
@@ -3013,31 +2852,22 @@
3013
2852
  "indexes": {
3014
2853
  "idx_invites_tenant_id": {
3015
2854
  "name": "idx_invites_tenant_id",
3016
- "columns": [
3017
- "tenant_id"
3018
- ],
2855
+ "columns": ["tenant_id"],
3019
2856
  "isUnique": false
3020
2857
  },
3021
2858
  "idx_invites_organization_id": {
3022
2859
  "name": "idx_invites_organization_id",
3023
- "columns": [
3024
- "organization_id"
3025
- ],
2860
+ "columns": ["organization_id"],
3026
2861
  "isUnique": false
3027
2862
  },
3028
2863
  "idx_invites_expires_at": {
3029
2864
  "name": "idx_invites_expires_at",
3030
- "columns": [
3031
- "expires_at"
3032
- ],
2865
+ "columns": ["expires_at"],
3033
2866
  "isUnique": false
3034
2867
  },
3035
2868
  "idx_invites_tenant_created": {
3036
2869
  "name": "idx_invites_tenant_created",
3037
- "columns": [
3038
- "tenant_id",
3039
- "created_at"
3040
- ],
2870
+ "columns": ["tenant_id", "created_at"],
3041
2871
  "isUnique": false
3042
2872
  }
3043
2873
  },
@@ -3123,9 +2953,7 @@
3123
2953
  "indexes": {
3124
2954
  "idx_organizations_tenant_id": {
3125
2955
  "name": "idx_organizations_tenant_id",
3126
- "columns": [
3127
- "tenant_id"
3128
- ],
2956
+ "columns": ["tenant_id"],
3129
2957
  "isUnique": false
3130
2958
  }
3131
2959
  },
@@ -3183,32 +3011,22 @@
3183
3011
  "indexes": {
3184
3012
  "user_organizations_unique": {
3185
3013
  "name": "user_organizations_unique",
3186
- "columns": [
3187
- "tenant_id",
3188
- "user_id",
3189
- "organization_id"
3190
- ],
3014
+ "columns": ["tenant_id", "user_id", "organization_id"],
3191
3015
  "isUnique": true
3192
3016
  },
3193
3017
  "idx_user_organizations_tenant_id": {
3194
3018
  "name": "idx_user_organizations_tenant_id",
3195
- "columns": [
3196
- "tenant_id"
3197
- ],
3019
+ "columns": ["tenant_id"],
3198
3020
  "isUnique": false
3199
3021
  },
3200
3022
  "idx_user_organizations_user_id": {
3201
3023
  "name": "idx_user_organizations_user_id",
3202
- "columns": [
3203
- "user_id"
3204
- ],
3024
+ "columns": ["user_id"],
3205
3025
  "isUnique": false
3206
3026
  },
3207
3027
  "idx_user_organizations_organization_id": {
3208
3028
  "name": "idx_user_organizations_organization_id",
3209
- "columns": [
3210
- "organization_id"
3211
- ],
3029
+ "columns": ["organization_id"],
3212
3030
  "isUnique": false
3213
3031
  }
3214
3032
  },
@@ -3345,10 +3163,7 @@
3345
3163
  "foreignKeys": {},
3346
3164
  "compositePrimaryKeys": {
3347
3165
  "resource_servers_pk": {
3348
- "columns": [
3349
- "tenant_id",
3350
- "id"
3351
- ],
3166
+ "columns": ["tenant_id", "id"],
3352
3167
  "name": "resource_servers_pk"
3353
3168
  }
3354
3169
  },
@@ -3397,10 +3212,7 @@
3397
3212
  "indexes": {
3398
3213
  "role_permissions_role_fk": {
3399
3214
  "name": "role_permissions_role_fk",
3400
- "columns": [
3401
- "tenant_id",
3402
- "role_id"
3403
- ],
3215
+ "columns": ["tenant_id", "role_id"],
3404
3216
  "isUnique": false
3405
3217
  },
3406
3218
  "role_permissions_permission_fk": {
@@ -3493,10 +3305,7 @@
3493
3305
  "foreignKeys": {},
3494
3306
  "compositePrimaryKeys": {
3495
3307
  "roles_pk": {
3496
- "columns": [
3497
- "tenant_id",
3498
- "id"
3499
- ],
3308
+ "columns": ["tenant_id", "id"],
3500
3309
  "name": "roles_pk"
3501
3310
  }
3502
3311
  },
@@ -3553,10 +3362,7 @@
3553
3362
  "indexes": {
3554
3363
  "user_permissions_user_fk": {
3555
3364
  "name": "user_permissions_user_fk",
3556
- "columns": [
3557
- "tenant_id",
3558
- "user_id"
3559
- ],
3365
+ "columns": ["tenant_id", "user_id"],
3560
3366
  "isUnique": false
3561
3367
  },
3562
3368
  "user_permissions_permission_fk": {
@@ -3570,9 +3376,7 @@
3570
3376
  },
3571
3377
  "user_permissions_organization_fk": {
3572
3378
  "name": "user_permissions_organization_fk",
3573
- "columns": [
3574
- "organization_id"
3575
- ],
3379
+ "columns": ["organization_id"],
3576
3380
  "isUnique": false
3577
3381
  }
3578
3382
  },
@@ -3635,37 +3439,24 @@
3635
3439
  "indexes": {
3636
3440
  "user_roles_user_fk": {
3637
3441
  "name": "user_roles_user_fk",
3638
- "columns": [
3639
- "tenant_id",
3640
- "user_id"
3641
- ],
3442
+ "columns": ["tenant_id", "user_id"],
3642
3443
  "isUnique": false
3643
3444
  },
3644
3445
  "user_roles_role_fk": {
3645
3446
  "name": "user_roles_role_fk",
3646
- "columns": [
3647
- "tenant_id",
3648
- "role_id"
3649
- ],
3447
+ "columns": ["tenant_id", "role_id"],
3650
3448
  "isUnique": false
3651
3449
  },
3652
3450
  "user_roles_organization_fk": {
3653
3451
  "name": "user_roles_organization_fk",
3654
- "columns": [
3655
- "organization_id"
3656
- ],
3452
+ "columns": ["organization_id"],
3657
3453
  "isUnique": false
3658
3454
  }
3659
3455
  },
3660
3456
  "foreignKeys": {},
3661
3457
  "compositePrimaryKeys": {
3662
3458
  "user_roles_pk": {
3663
- "columns": [
3664
- "tenant_id",
3665
- "user_id",
3666
- "role_id",
3667
- "organization_id"
3668
- ],
3459
+ "columns": ["tenant_id", "user_id", "role_id", "organization_id"],
3669
3460
  "name": "user_roles_pk"
3670
3461
  }
3671
3462
  },
@@ -3745,12 +3536,8 @@
3745
3536
  "name": "branding_tenant_id_tenants_id_fk",
3746
3537
  "tableFrom": "branding",
3747
3538
  "tableTo": "tenants",
3748
- "columnsFrom": [
3749
- "tenant_id"
3750
- ],
3751
- "columnsTo": [
3752
- "id"
3753
- ],
3539
+ "columnsFrom": ["tenant_id"],
3540
+ "columnsTo": ["id"],
3754
3541
  "onDelete": "cascade",
3755
3542
  "onUpdate": "no action"
3756
3543
  }
@@ -3811,23 +3598,15 @@
3811
3598
  "name": "custom_text_tenant_id_tenants_id_fk",
3812
3599
  "tableFrom": "custom_text",
3813
3600
  "tableTo": "tenants",
3814
- "columnsFrom": [
3815
- "tenant_id"
3816
- ],
3817
- "columnsTo": [
3818
- "id"
3819
- ],
3601
+ "columnsFrom": ["tenant_id"],
3602
+ "columnsTo": ["id"],
3820
3603
  "onDelete": "cascade",
3821
3604
  "onUpdate": "no action"
3822
3605
  }
3823
3606
  },
3824
3607
  "compositePrimaryKeys": {
3825
3608
  "custom_text_tenant_id_prompt_language_pk": {
3826
- "columns": [
3827
- "tenant_id",
3828
- "prompt",
3829
- "language"
3830
- ],
3609
+ "columns": ["tenant_id", "prompt", "language"],
3831
3610
  "name": "custom_text_tenant_id_prompt_language_pk"
3832
3611
  }
3833
3612
  },
@@ -3999,22 +3778,15 @@
3999
3778
  "name": "email_templates_tenant_id_tenants_id_fk",
4000
3779
  "tableFrom": "email_templates",
4001
3780
  "tableTo": "tenants",
4002
- "columnsFrom": [
4003
- "tenant_id"
4004
- ],
4005
- "columnsTo": [
4006
- "id"
4007
- ],
3781
+ "columnsFrom": ["tenant_id"],
3782
+ "columnsTo": ["id"],
4008
3783
  "onDelete": "cascade",
4009
3784
  "onUpdate": "no action"
4010
3785
  }
4011
3786
  },
4012
3787
  "compositePrimaryKeys": {
4013
3788
  "email_templates_tenant_id_template_pk": {
4014
- "columns": [
4015
- "tenant_id",
4016
- "template"
4017
- ],
3789
+ "columns": ["tenant_id", "template"],
4018
3790
  "name": "email_templates_tenant_id_template_pk"
4019
3791
  }
4020
3792
  },
@@ -4070,9 +3842,7 @@
4070
3842
  "indexes": {
4071
3843
  "flows_tenant_id_idx": {
4072
3844
  "name": "flows_tenant_id_idx",
4073
- "columns": [
4074
- "tenant_id"
4075
- ],
3845
+ "columns": ["tenant_id"],
4076
3846
  "isUnique": false
4077
3847
  }
4078
3848
  },
@@ -4081,12 +3851,8 @@
4081
3851
  "name": "flows_tenant_id_tenants_id_fk",
4082
3852
  "tableFrom": "flows",
4083
3853
  "tableTo": "tenants",
4084
- "columnsFrom": [
4085
- "tenant_id"
4086
- ],
4087
- "columnsTo": [
4088
- "id"
4089
- ],
3854
+ "columnsFrom": ["tenant_id"],
3855
+ "columnsTo": ["id"],
4090
3856
  "onDelete": "cascade",
4091
3857
  "onUpdate": "no action"
4092
3858
  }
@@ -4186,9 +3952,7 @@
4186
3952
  "indexes": {
4187
3953
  "forms_tenant_id_idx": {
4188
3954
  "name": "forms_tenant_id_idx",
4189
- "columns": [
4190
- "tenant_id"
4191
- ],
3955
+ "columns": ["tenant_id"],
4192
3956
  "isUnique": false
4193
3957
  }
4194
3958
  },
@@ -4197,12 +3961,8 @@
4197
3961
  "name": "forms_tenant_id_tenants_id_fk",
4198
3962
  "tableFrom": "forms",
4199
3963
  "tableTo": "tenants",
4200
- "columnsFrom": [
4201
- "tenant_id"
4202
- ],
4203
- "columnsTo": [
4204
- "id"
4205
- ],
3964
+ "columnsFrom": ["tenant_id"],
3965
+ "columnsTo": ["id"],
4206
3966
  "onDelete": "cascade",
4207
3967
  "onUpdate": "no action"
4208
3968
  }
@@ -4260,9 +4020,7 @@
4260
4020
  "indexes": {
4261
4021
  "hook_code_tenant_id_idx": {
4262
4022
  "name": "hook_code_tenant_id_idx",
4263
- "columns": [
4264
- "tenant_id"
4265
- ],
4023
+ "columns": ["tenant_id"],
4266
4024
  "isUnique": false
4267
4025
  }
4268
4026
  },
@@ -4271,12 +4029,8 @@
4271
4029
  "name": "hook_code_tenant_id_tenants_id_fk",
4272
4030
  "tableFrom": "hook_code",
4273
4031
  "tableTo": "tenants",
4274
- "columnsFrom": [
4275
- "tenant_id"
4276
- ],
4277
- "columnsTo": [
4278
- "id"
4279
- ],
4032
+ "columnsFrom": ["tenant_id"],
4033
+ "columnsTo": ["id"],
4280
4034
  "onDelete": "cascade",
4281
4035
  "onUpdate": "no action"
4282
4036
  }
@@ -4384,9 +4138,7 @@
4384
4138
  "indexes": {
4385
4139
  "hooks_tenant_id_idx": {
4386
4140
  "name": "hooks_tenant_id_idx",
4387
- "columns": [
4388
- "tenant_id"
4389
- ],
4141
+ "columns": ["tenant_id"],
4390
4142
  "isUnique": false
4391
4143
  }
4392
4144
  },
@@ -4395,12 +4147,8 @@
4395
4147
  "name": "hooks_tenant_id_tenants_id_fk",
4396
4148
  "tableFrom": "hooks",
4397
4149
  "tableTo": "tenants",
4398
- "columnsFrom": [
4399
- "tenant_id"
4400
- ],
4401
- "columnsTo": [
4402
- "id"
4403
- ],
4150
+ "columnsFrom": ["tenant_id"],
4151
+ "columnsTo": ["id"],
4404
4152
  "onDelete": "cascade",
4405
4153
  "onUpdate": "no action"
4406
4154
  }
@@ -4504,12 +4252,8 @@
4504
4252
  "name": "keys_tenant_id_tenants_id_fk",
4505
4253
  "tableFrom": "keys",
4506
4254
  "tableTo": "tenants",
4507
- "columnsFrom": [
4508
- "tenant_id"
4509
- ],
4510
- "columnsTo": [
4511
- "id"
4512
- ],
4255
+ "columnsFrom": ["tenant_id"],
4256
+ "columnsTo": ["id"],
4513
4257
  "onDelete": "cascade",
4514
4258
  "onUpdate": "no action"
4515
4259
  },
@@ -4517,12 +4261,8 @@
4517
4261
  "name": "keys_connection_connections_id_fk",
4518
4262
  "tableFrom": "keys",
4519
4263
  "tableTo": "connections",
4520
- "columnsFrom": [
4521
- "connection"
4522
- ],
4523
- "columnsTo": [
4524
- "id"
4525
- ],
4264
+ "columnsFrom": ["connection"],
4265
+ "columnsTo": ["id"],
4526
4266
  "onDelete": "cascade",
4527
4267
  "onUpdate": "no action"
4528
4268
  }
@@ -4979,9 +4719,7 @@
4979
4719
  "indexes": {
4980
4720
  "themes_tenant_id_idx": {
4981
4721
  "name": "themes_tenant_id_idx",
4982
- "columns": [
4983
- "tenant_id"
4984
- ],
4722
+ "columns": ["tenant_id"],
4985
4723
  "isUnique": false
4986
4724
  }
4987
4725
  },
@@ -4990,22 +4728,15 @@
4990
4728
  "name": "themes_tenant_id_tenants_id_fk",
4991
4729
  "tableFrom": "themes",
4992
4730
  "tableTo": "tenants",
4993
- "columnsFrom": [
4994
- "tenant_id"
4995
- ],
4996
- "columnsTo": [
4997
- "id"
4998
- ],
4731
+ "columnsFrom": ["tenant_id"],
4732
+ "columnsTo": ["id"],
4999
4733
  "onDelete": "cascade",
5000
4734
  "onUpdate": "no action"
5001
4735
  }
5002
4736
  },
5003
4737
  "compositePrimaryKeys": {
5004
4738
  "themes_pkey": {
5005
- "columns": [
5006
- "tenant_id",
5007
- "themeId"
5008
- ],
4739
+ "columns": ["tenant_id", "themeId"],
5009
4740
  "name": "themes_pkey"
5010
4741
  }
5011
4742
  },
@@ -5050,12 +4781,8 @@
5050
4781
  "name": "universal_login_templates_tenant_id_tenants_id_fk",
5051
4782
  "tableFrom": "universal_login_templates",
5052
4783
  "tableTo": "tenants",
5053
- "columnsFrom": [
5054
- "tenant_id"
5055
- ],
5056
- "columnsTo": [
5057
- "id"
5058
- ],
4784
+ "columnsFrom": ["tenant_id"],
4785
+ "columnsTo": ["id"],
5059
4786
  "onDelete": "cascade",
5060
4787
  "onUpdate": "no action"
5061
4788
  }
@@ -5177,17 +4904,12 @@
5177
4904
  "indexes": {
5178
4905
  "authentication_methods_tenant_user_idx": {
5179
4906
  "name": "authentication_methods_tenant_user_idx",
5180
- "columns": [
5181
- "tenant_id",
5182
- "user_id"
5183
- ],
4907
+ "columns": ["tenant_id", "user_id"],
5184
4908
  "isUnique": false
5185
4909
  },
5186
4910
  "authentication_methods_credential_id_idx": {
5187
4911
  "name": "authentication_methods_credential_id_idx",
5188
- "columns": [
5189
- "credential_id"
5190
- ],
4912
+ "columns": ["credential_id"],
5191
4913
  "isUnique": false
5192
4914
  }
5193
4915
  },
@@ -5196,12 +4918,8 @@
5196
4918
  "name": "authentication_methods_tenant_id_tenants_id_fk",
5197
4919
  "tableFrom": "authentication_methods",
5198
4920
  "tableTo": "tenants",
5199
- "columnsFrom": [
5200
- "tenant_id"
5201
- ],
5202
- "columnsTo": [
5203
- "id"
5204
- ],
4921
+ "columnsFrom": ["tenant_id"],
4922
+ "columnsTo": ["id"],
5205
4923
  "onDelete": "cascade",
5206
4924
  "onUpdate": "no action"
5207
4925
  }
@@ -5420,33 +5138,22 @@
5420
5138
  "indexes": {
5421
5139
  "logs_user_id": {
5422
5140
  "name": "logs_user_id",
5423
- "columns": [
5424
- "user_id"
5425
- ],
5141
+ "columns": ["user_id"],
5426
5142
  "isUnique": false
5427
5143
  },
5428
5144
  "logs_tenant_id": {
5429
5145
  "name": "logs_tenant_id",
5430
- "columns": [
5431
- "tenant_id"
5432
- ],
5146
+ "columns": ["tenant_id"],
5433
5147
  "isUnique": false
5434
5148
  },
5435
5149
  "logs_date": {
5436
5150
  "name": "logs_date",
5437
- "columns": [
5438
- "date"
5439
- ],
5151
+ "columns": ["date"],
5440
5152
  "isUnique": false
5441
5153
  },
5442
5154
  "IDX_logs_tenant_date_type_user": {
5443
5155
  "name": "IDX_logs_tenant_date_type_user",
5444
- "columns": [
5445
- "tenant_id",
5446
- "date",
5447
- "type",
5448
- "user_id"
5449
- ],
5156
+ "columns": ["tenant_id", "date", "type", "user_id"],
5450
5157
  "isUnique": false
5451
5158
  }
5452
5159
  },
@@ -5575,31 +5282,22 @@
5575
5282
  "indexes": {
5576
5283
  "idx_outbox_events_tenant_id": {
5577
5284
  "name": "idx_outbox_events_tenant_id",
5578
- "columns": [
5579
- "tenant_id"
5580
- ],
5285
+ "columns": ["tenant_id"],
5581
5286
  "isUnique": false
5582
5287
  },
5583
5288
  "idx_outbox_events_processed_at": {
5584
5289
  "name": "idx_outbox_events_processed_at",
5585
- "columns": [
5586
- "processed_at"
5587
- ],
5290
+ "columns": ["processed_at"],
5588
5291
  "isUnique": false
5589
5292
  },
5590
5293
  "idx_outbox_events_claimed_by": {
5591
5294
  "name": "idx_outbox_events_claimed_by",
5592
- "columns": [
5593
- "claimed_by"
5594
- ],
5295
+ "columns": ["claimed_by"],
5595
5296
  "isUnique": false
5596
5297
  },
5597
5298
  "idx_outbox_events_tenant_dead_lettered": {
5598
5299
  "name": "idx_outbox_events_tenant_dead_lettered",
5599
- "columns": [
5600
- "tenant_id",
5601
- "dead_lettered_at"
5602
- ],
5300
+ "columns": ["tenant_id", "dead_lettered_at"],
5603
5301
  "isUnique": false
5604
5302
  }
5605
5303
  },
@@ -5608,12 +5306,8 @@
5608
5306
  "name": "outbox_events_tenant_id_tenants_id_fk",
5609
5307
  "tableFrom": "outbox_events",
5610
5308
  "tableTo": "tenants",
5611
- "columnsFrom": [
5612
- "tenant_id"
5613
- ],
5614
- "columnsTo": [
5615
- "id"
5616
- ],
5309
+ "columnsFrom": ["tenant_id"],
5310
+ "columnsTo": ["id"],
5617
5311
  "onDelete": "cascade",
5618
5312
  "onUpdate": "no action"
5619
5313
  }
@@ -5633,4 +5327,4 @@
5633
5327
  "internal": {
5634
5328
  "indexes": {}
5635
5329
  }
5636
- }
5330
+ }