@authhero/drizzle 0.33.0 → 0.34.1

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
  }
@@ -644,59 +640,37 @@
644
640
  "indexes": {
645
641
  "unique_email_provider": {
646
642
  "name": "unique_email_provider",
647
- "columns": [
648
- "email",
649
- "provider",
650
- "tenant_id"
651
- ],
643
+ "columns": ["email", "provider", "tenant_id"],
652
644
  "isUnique": true
653
645
  },
654
646
  "unique_phone_provider": {
655
647
  "name": "unique_phone_provider",
656
- "columns": [
657
- "phone_number",
658
- "provider",
659
- "tenant_id"
660
- ],
648
+ "columns": ["phone_number", "provider", "tenant_id"],
661
649
  "isUnique": true
662
650
  },
663
651
  "unique_username_provider": {
664
652
  "name": "unique_username_provider",
665
- "columns": [
666
- "username",
667
- "provider",
668
- "tenant_id"
669
- ],
653
+ "columns": ["username", "provider", "tenant_id"],
670
654
  "isUnique": true
671
655
  },
672
656
  "users_email_index": {
673
657
  "name": "users_email_index",
674
- "columns": [
675
- "email"
676
- ],
658
+ "columns": ["email"],
677
659
  "isUnique": false
678
660
  },
679
661
  "users_linked_to_index": {
680
662
  "name": "users_linked_to_index",
681
- "columns": [
682
- "linked_to"
683
- ],
663
+ "columns": ["linked_to"],
684
664
  "isUnique": false
685
665
  },
686
666
  "users_name_index": {
687
667
  "name": "users_name_index",
688
- "columns": [
689
- "name"
690
- ],
668
+ "columns": ["name"],
691
669
  "isUnique": false
692
670
  },
693
671
  "users_phone_tenant_provider_index": {
694
672
  "name": "users_phone_tenant_provider_index",
695
- "columns": [
696
- "tenant_id",
697
- "phone_number",
698
- "provider"
699
- ],
673
+ "columns": ["tenant_id", "phone_number", "provider"],
700
674
  "isUnique": false
701
675
  }
702
676
  },
@@ -705,22 +679,15 @@
705
679
  "name": "users_tenant_id_tenants_id_fk",
706
680
  "tableFrom": "users",
707
681
  "tableTo": "tenants",
708
- "columnsFrom": [
709
- "tenant_id"
710
- ],
711
- "columnsTo": [
712
- "id"
713
- ],
682
+ "columnsFrom": ["tenant_id"],
683
+ "columnsTo": ["id"],
714
684
  "onDelete": "cascade",
715
685
  "onUpdate": "no action"
716
686
  }
717
687
  },
718
688
  "compositePrimaryKeys": {
719
689
  "users_tenants": {
720
- "columns": [
721
- "user_id",
722
- "tenant_id"
723
- ],
690
+ "columns": ["user_id", "tenant_id"],
724
691
  "name": "users_tenants"
725
692
  }
726
693
  },
@@ -828,12 +795,8 @@
828
795
  "name": "authentication_codes_tenant_id_tenants_id_fk",
829
796
  "tableFrom": "authentication_codes",
830
797
  "tableTo": "tenants",
831
- "columnsFrom": [
832
- "tenant_id"
833
- ],
834
- "columnsTo": [
835
- "id"
836
- ],
798
+ "columnsFrom": ["tenant_id"],
799
+ "columnsTo": ["id"],
837
800
  "onDelete": "cascade",
838
801
  "onUpdate": "no action"
839
802
  }
@@ -954,9 +917,7 @@
954
917
  "indexes": {
955
918
  "codes_expires_at_index": {
956
919
  "name": "codes_expires_at_index",
957
- "columns": [
958
- "expires_at"
959
- ],
920
+ "columns": ["expires_at"],
960
921
  "isUnique": false
961
922
  }
962
923
  },
@@ -965,22 +926,15 @@
965
926
  "name": "codes_tenant_id_tenants_id_fk",
966
927
  "tableFrom": "codes",
967
928
  "tableTo": "tenants",
968
- "columnsFrom": [
969
- "tenant_id"
970
- ],
971
- "columnsTo": [
972
- "id"
973
- ],
929
+ "columnsFrom": ["tenant_id"],
930
+ "columnsTo": ["id"],
974
931
  "onDelete": "cascade",
975
932
  "onUpdate": "no action"
976
933
  }
977
934
  },
978
935
  "compositePrimaryKeys": {
979
936
  "PK_codes_code_id_code_type": {
980
- "columns": [
981
- "code_id",
982
- "code_type"
983
- ],
937
+ "columns": ["code_id", "code_type"],
984
938
  "name": "PK_codes_code_id_code_type"
985
939
  }
986
940
  },
@@ -1219,39 +1173,27 @@
1219
1173
  "indexes": {
1220
1174
  "login_sessions_id_index": {
1221
1175
  "name": "login_sessions_id_index",
1222
- "columns": [
1223
- "id"
1224
- ],
1176
+ "columns": ["id"],
1225
1177
  "isUnique": false
1226
1178
  },
1227
1179
  "login_sessions_state_idx": {
1228
1180
  "name": "login_sessions_state_idx",
1229
- "columns": [
1230
- "state"
1231
- ],
1181
+ "columns": ["state"],
1232
1182
  "isUnique": false
1233
1183
  },
1234
1184
  "login_sessions_state_updated_idx": {
1235
1185
  "name": "login_sessions_state_updated_idx",
1236
- "columns": [
1237
- "state",
1238
- "updated_at_ts"
1239
- ],
1186
+ "columns": ["state", "updated_at_ts"],
1240
1187
  "isUnique": false
1241
1188
  },
1242
1189
  "login_sessions_tenant_user_idx": {
1243
1190
  "name": "login_sessions_tenant_user_idx",
1244
- "columns": [
1245
- "tenant_id",
1246
- "user_id"
1247
- ],
1191
+ "columns": ["tenant_id", "user_id"],
1248
1192
  "isUnique": false
1249
1193
  },
1250
1194
  "idx_login_sessions_expires_at_ts": {
1251
1195
  "name": "idx_login_sessions_expires_at_ts",
1252
- "columns": [
1253
- "expires_at_ts"
1254
- ],
1196
+ "columns": ["expires_at_ts"],
1255
1197
  "isUnique": false
1256
1198
  }
1257
1199
  },
@@ -1260,22 +1202,15 @@
1260
1202
  "name": "login_sessions_tenant_id_tenants_id_fk",
1261
1203
  "tableFrom": "login_sessions",
1262
1204
  "tableTo": "tenants",
1263
- "columnsFrom": [
1264
- "tenant_id"
1265
- ],
1266
- "columnsTo": [
1267
- "id"
1268
- ],
1205
+ "columnsFrom": ["tenant_id"],
1206
+ "columnsTo": ["id"],
1269
1207
  "onDelete": "cascade",
1270
1208
  "onUpdate": "no action"
1271
1209
  }
1272
1210
  },
1273
1211
  "compositePrimaryKeys": {
1274
1212
  "login_sessions_pk": {
1275
- "columns": [
1276
- "tenant_id",
1277
- "id"
1278
- ],
1213
+ "columns": ["tenant_id", "id"],
1279
1214
  "name": "login_sessions_pk"
1280
1215
  }
1281
1216
  },
@@ -1415,16 +1350,12 @@
1415
1350
  "indexes": {
1416
1351
  "otps_email_index": {
1417
1352
  "name": "otps_email_index",
1418
- "columns": [
1419
- "email"
1420
- ],
1353
+ "columns": ["email"],
1421
1354
  "isUnique": false
1422
1355
  },
1423
1356
  "otps_expires_at_index": {
1424
1357
  "name": "otps_expires_at_index",
1425
- "columns": [
1426
- "expires_at"
1427
- ],
1358
+ "columns": ["expires_at"],
1428
1359
  "isUnique": false
1429
1360
  }
1430
1361
  },
@@ -1433,12 +1364,8 @@
1433
1364
  "name": "otps_tenant_id_tenants_id_fk",
1434
1365
  "tableFrom": "otps",
1435
1366
  "tableTo": "tenants",
1436
- "columnsFrom": [
1437
- "tenant_id"
1438
- ],
1439
- "columnsTo": [
1440
- "id"
1441
- ],
1367
+ "columnsFrom": ["tenant_id"],
1368
+ "columnsTo": ["id"],
1442
1369
  "onDelete": "cascade",
1443
1370
  "onUpdate": "no action"
1444
1371
  }
@@ -1538,24 +1465,17 @@
1538
1465
  "indexes": {
1539
1466
  "idx_refresh_tokens_user_id": {
1540
1467
  "name": "idx_refresh_tokens_user_id",
1541
- "columns": [
1542
- "tenant_id",
1543
- "user_id"
1544
- ],
1468
+ "columns": ["tenant_id", "user_id"],
1545
1469
  "isUnique": false
1546
1470
  },
1547
1471
  "idx_refresh_tokens_login_id": {
1548
1472
  "name": "idx_refresh_tokens_login_id",
1549
- "columns": [
1550
- "login_id"
1551
- ],
1473
+ "columns": ["login_id"],
1552
1474
  "isUnique": false
1553
1475
  },
1554
1476
  "idx_refresh_tokens_expires_at_ts": {
1555
1477
  "name": "idx_refresh_tokens_expires_at_ts",
1556
- "columns": [
1557
- "expires_at_ts"
1558
- ],
1478
+ "columns": ["expires_at_ts"],
1559
1479
  "isUnique": false
1560
1480
  }
1561
1481
  },
@@ -1564,22 +1484,15 @@
1564
1484
  "name": "refresh_tokens_tenant_id_tenants_id_fk",
1565
1485
  "tableFrom": "refresh_tokens",
1566
1486
  "tableTo": "tenants",
1567
- "columnsFrom": [
1568
- "tenant_id"
1569
- ],
1570
- "columnsTo": [
1571
- "id"
1572
- ],
1487
+ "columnsFrom": ["tenant_id"],
1488
+ "columnsTo": ["id"],
1573
1489
  "onDelete": "cascade",
1574
1490
  "onUpdate": "no action"
1575
1491
  }
1576
1492
  },
1577
1493
  "compositePrimaryKeys": {
1578
1494
  "refresh_tokens_pk": {
1579
- "columns": [
1580
- "tenant_id",
1581
- "id"
1582
- ],
1495
+ "columns": ["tenant_id", "id"],
1583
1496
  "name": "refresh_tokens_pk"
1584
1497
  }
1585
1498
  },
@@ -1691,24 +1604,17 @@
1691
1604
  "indexes": {
1692
1605
  "IDX_sessions_login_session_id": {
1693
1606
  "name": "IDX_sessions_login_session_id",
1694
- "columns": [
1695
- "login_session_id"
1696
- ],
1607
+ "columns": ["login_session_id"],
1697
1608
  "isUnique": false
1698
1609
  },
1699
1610
  "idx_sessions_user_id": {
1700
1611
  "name": "idx_sessions_user_id",
1701
- "columns": [
1702
- "tenant_id",
1703
- "user_id"
1704
- ],
1612
+ "columns": ["tenant_id", "user_id"],
1705
1613
  "isUnique": false
1706
1614
  },
1707
1615
  "idx_sessions_expires_at_ts": {
1708
1616
  "name": "idx_sessions_expires_at_ts",
1709
- "columns": [
1710
- "expires_at_ts"
1711
- ],
1617
+ "columns": ["expires_at_ts"],
1712
1618
  "isUnique": false
1713
1619
  }
1714
1620
  },
@@ -1717,22 +1623,15 @@
1717
1623
  "name": "sessions_tenant_id_tenants_id_fk",
1718
1624
  "tableFrom": "sessions",
1719
1625
  "tableTo": "tenants",
1720
- "columnsFrom": [
1721
- "tenant_id"
1722
- ],
1723
- "columnsTo": [
1724
- "id"
1725
- ],
1626
+ "columnsFrom": ["tenant_id"],
1627
+ "columnsTo": ["id"],
1726
1628
  "onDelete": "cascade",
1727
1629
  "onUpdate": "no action"
1728
1630
  }
1729
1631
  },
1730
1632
  "compositePrimaryKeys": {
1731
1633
  "sessions_pk": {
1732
- "columns": [
1733
- "tenant_id",
1734
- "id"
1735
- ],
1634
+ "columns": ["tenant_id", "id"],
1736
1635
  "name": "sessions_pk"
1737
1636
  }
1738
1637
  },
@@ -1840,12 +1739,8 @@
1840
1739
  "name": "tickets_tenant_id_tenants_id_fk",
1841
1740
  "tableFrom": "tickets",
1842
1741
  "tableTo": "tenants",
1843
- "columnsFrom": [
1844
- "tenant_id"
1845
- ],
1846
- "columnsTo": [
1847
- "id"
1848
- ],
1742
+ "columnsFrom": ["tenant_id"],
1743
+ "columnsTo": ["id"],
1849
1744
  "onDelete": "cascade",
1850
1745
  "onUpdate": "no action"
1851
1746
  }
@@ -1949,9 +1844,7 @@
1949
1844
  "indexes": {
1950
1845
  "idx_client_grants_audience": {
1951
1846
  "name": "idx_client_grants_audience",
1952
- "columns": [
1953
- "audience"
1954
- ],
1847
+ "columns": ["audience"],
1955
1848
  "isUnique": false
1956
1849
  }
1957
1850
  },
@@ -1960,22 +1853,15 @@
1960
1853
  "name": "client_grants_tenant_id_tenants_id_fk",
1961
1854
  "tableFrom": "client_grants",
1962
1855
  "tableTo": "tenants",
1963
- "columnsFrom": [
1964
- "tenant_id"
1965
- ],
1966
- "columnsTo": [
1967
- "id"
1968
- ],
1856
+ "columnsFrom": ["tenant_id"],
1857
+ "columnsTo": ["id"],
1969
1858
  "onDelete": "cascade",
1970
1859
  "onUpdate": "no action"
1971
1860
  }
1972
1861
  },
1973
1862
  "compositePrimaryKeys": {
1974
1863
  "pk_client_grants": {
1975
- "columns": [
1976
- "tenant_id",
1977
- "id"
1978
- ],
1864
+ "columns": ["tenant_id", "id"],
1979
1865
  "name": "pk_client_grants"
1980
1866
  }
1981
1867
  },
@@ -2364,22 +2250,15 @@
2364
2250
  "name": "clients_tenant_id_tenants_id_fk",
2365
2251
  "tableFrom": "clients",
2366
2252
  "tableTo": "tenants",
2367
- "columnsFrom": [
2368
- "tenant_id"
2369
- ],
2370
- "columnsTo": [
2371
- "id"
2372
- ],
2253
+ "columnsFrom": ["tenant_id"],
2254
+ "columnsTo": ["id"],
2373
2255
  "onDelete": "cascade",
2374
2256
  "onUpdate": "no action"
2375
2257
  }
2376
2258
  },
2377
2259
  "compositePrimaryKeys": {
2378
2260
  "clients_tenant_id_client_id": {
2379
- "columns": [
2380
- "tenant_id",
2381
- "client_id"
2382
- ],
2261
+ "columns": ["tenant_id", "client_id"],
2383
2262
  "name": "clients_tenant_id_client_id"
2384
2263
  }
2385
2264
  },
@@ -2493,16 +2372,12 @@
2493
2372
  "indexes": {
2494
2373
  "connections_tenant_id_index": {
2495
2374
  "name": "connections_tenant_id_index",
2496
- "columns": [
2497
- "tenant_id"
2498
- ],
2375
+ "columns": ["tenant_id"],
2499
2376
  "isUnique": false
2500
2377
  },
2501
2378
  "connections_id_unique": {
2502
2379
  "name": "connections_id_unique",
2503
- "columns": [
2504
- "id"
2505
- ],
2380
+ "columns": ["id"],
2506
2381
  "isUnique": true
2507
2382
  }
2508
2383
  },
@@ -2511,22 +2386,15 @@
2511
2386
  "name": "connections_tenant_id_tenants_id_fk",
2512
2387
  "tableFrom": "connections",
2513
2388
  "tableTo": "tenants",
2514
- "columnsFrom": [
2515
- "tenant_id"
2516
- ],
2517
- "columnsTo": [
2518
- "id"
2519
- ],
2389
+ "columnsFrom": ["tenant_id"],
2390
+ "columnsTo": ["id"],
2520
2391
  "onDelete": "cascade",
2521
2392
  "onUpdate": "no action"
2522
2393
  }
2523
2394
  },
2524
2395
  "compositePrimaryKeys": {
2525
2396
  "connections_tenant_id_id_pk": {
2526
- "columns": [
2527
- "tenant_id",
2528
- "id"
2529
- ],
2397
+ "columns": ["tenant_id", "id"],
2530
2398
  "name": "connections_tenant_id_id_pk"
2531
2399
  }
2532
2400
  },
@@ -2631,9 +2499,7 @@
2631
2499
  "indexes": {
2632
2500
  "custom_domains_domain_unique": {
2633
2501
  "name": "custom_domains_domain_unique",
2634
- "columns": [
2635
- "domain"
2636
- ],
2502
+ "columns": ["domain"],
2637
2503
  "isUnique": true
2638
2504
  }
2639
2505
  },
@@ -2642,12 +2508,8 @@
2642
2508
  "name": "custom_domains_tenant_id_tenants_id_fk",
2643
2509
  "tableFrom": "custom_domains",
2644
2510
  "tableTo": "tenants",
2645
- "columnsFrom": [
2646
- "tenant_id"
2647
- ],
2648
- "columnsTo": [
2649
- "id"
2650
- ],
2511
+ "columnsFrom": ["tenant_id"],
2512
+ "columnsTo": ["id"],
2651
2513
  "onDelete": "cascade",
2652
2514
  "onUpdate": "no action"
2653
2515
  }
@@ -2729,12 +2591,8 @@
2729
2591
  "name": "domains_tenant_id_tenants_id_fk",
2730
2592
  "tableFrom": "domains",
2731
2593
  "tableTo": "tenants",
2732
- "columnsFrom": [
2733
- "tenant_id"
2734
- ],
2735
- "columnsTo": [
2736
- "id"
2737
- ],
2594
+ "columnsFrom": ["tenant_id"],
2595
+ "columnsTo": ["id"],
2738
2596
  "onDelete": "cascade",
2739
2597
  "onUpdate": "no action"
2740
2598
  }
@@ -2862,31 +2720,22 @@
2862
2720
  "indexes": {
2863
2721
  "idx_invites_tenant_id": {
2864
2722
  "name": "idx_invites_tenant_id",
2865
- "columns": [
2866
- "tenant_id"
2867
- ],
2723
+ "columns": ["tenant_id"],
2868
2724
  "isUnique": false
2869
2725
  },
2870
2726
  "idx_invites_organization_id": {
2871
2727
  "name": "idx_invites_organization_id",
2872
- "columns": [
2873
- "organization_id"
2874
- ],
2728
+ "columns": ["organization_id"],
2875
2729
  "isUnique": false
2876
2730
  },
2877
2731
  "idx_invites_expires_at": {
2878
2732
  "name": "idx_invites_expires_at",
2879
- "columns": [
2880
- "expires_at"
2881
- ],
2733
+ "columns": ["expires_at"],
2882
2734
  "isUnique": false
2883
2735
  },
2884
2736
  "idx_invites_tenant_created": {
2885
2737
  "name": "idx_invites_tenant_created",
2886
- "columns": [
2887
- "tenant_id",
2888
- "created_at"
2889
- ],
2738
+ "columns": ["tenant_id", "created_at"],
2890
2739
  "isUnique": false
2891
2740
  }
2892
2741
  },
@@ -2972,9 +2821,7 @@
2972
2821
  "indexes": {
2973
2822
  "idx_organizations_tenant_id": {
2974
2823
  "name": "idx_organizations_tenant_id",
2975
- "columns": [
2976
- "tenant_id"
2977
- ],
2824
+ "columns": ["tenant_id"],
2978
2825
  "isUnique": false
2979
2826
  }
2980
2827
  },
@@ -3032,32 +2879,22 @@
3032
2879
  "indexes": {
3033
2880
  "user_organizations_unique": {
3034
2881
  "name": "user_organizations_unique",
3035
- "columns": [
3036
- "tenant_id",
3037
- "user_id",
3038
- "organization_id"
3039
- ],
2882
+ "columns": ["tenant_id", "user_id", "organization_id"],
3040
2883
  "isUnique": true
3041
2884
  },
3042
2885
  "idx_user_organizations_tenant_id": {
3043
2886
  "name": "idx_user_organizations_tenant_id",
3044
- "columns": [
3045
- "tenant_id"
3046
- ],
2887
+ "columns": ["tenant_id"],
3047
2888
  "isUnique": false
3048
2889
  },
3049
2890
  "idx_user_organizations_user_id": {
3050
2891
  "name": "idx_user_organizations_user_id",
3051
- "columns": [
3052
- "user_id"
3053
- ],
2892
+ "columns": ["user_id"],
3054
2893
  "isUnique": false
3055
2894
  },
3056
2895
  "idx_user_organizations_organization_id": {
3057
2896
  "name": "idx_user_organizations_organization_id",
3058
- "columns": [
3059
- "organization_id"
3060
- ],
2897
+ "columns": ["organization_id"],
3061
2898
  "isUnique": false
3062
2899
  }
3063
2900
  },
@@ -3194,10 +3031,7 @@
3194
3031
  "foreignKeys": {},
3195
3032
  "compositePrimaryKeys": {
3196
3033
  "resource_servers_pk": {
3197
- "columns": [
3198
- "tenant_id",
3199
- "id"
3200
- ],
3034
+ "columns": ["tenant_id", "id"],
3201
3035
  "name": "resource_servers_pk"
3202
3036
  }
3203
3037
  },
@@ -3246,10 +3080,7 @@
3246
3080
  "indexes": {
3247
3081
  "role_permissions_role_fk": {
3248
3082
  "name": "role_permissions_role_fk",
3249
- "columns": [
3250
- "tenant_id",
3251
- "role_id"
3252
- ],
3083
+ "columns": ["tenant_id", "role_id"],
3253
3084
  "isUnique": false
3254
3085
  },
3255
3086
  "role_permissions_permission_fk": {
@@ -3342,10 +3173,7 @@
3342
3173
  "foreignKeys": {},
3343
3174
  "compositePrimaryKeys": {
3344
3175
  "roles_pk": {
3345
- "columns": [
3346
- "tenant_id",
3347
- "id"
3348
- ],
3176
+ "columns": ["tenant_id", "id"],
3349
3177
  "name": "roles_pk"
3350
3178
  }
3351
3179
  },
@@ -3402,10 +3230,7 @@
3402
3230
  "indexes": {
3403
3231
  "user_permissions_user_fk": {
3404
3232
  "name": "user_permissions_user_fk",
3405
- "columns": [
3406
- "tenant_id",
3407
- "user_id"
3408
- ],
3233
+ "columns": ["tenant_id", "user_id"],
3409
3234
  "isUnique": false
3410
3235
  },
3411
3236
  "user_permissions_permission_fk": {
@@ -3419,9 +3244,7 @@
3419
3244
  },
3420
3245
  "user_permissions_organization_fk": {
3421
3246
  "name": "user_permissions_organization_fk",
3422
- "columns": [
3423
- "organization_id"
3424
- ],
3247
+ "columns": ["organization_id"],
3425
3248
  "isUnique": false
3426
3249
  }
3427
3250
  },
@@ -3484,37 +3307,24 @@
3484
3307
  "indexes": {
3485
3308
  "user_roles_user_fk": {
3486
3309
  "name": "user_roles_user_fk",
3487
- "columns": [
3488
- "tenant_id",
3489
- "user_id"
3490
- ],
3310
+ "columns": ["tenant_id", "user_id"],
3491
3311
  "isUnique": false
3492
3312
  },
3493
3313
  "user_roles_role_fk": {
3494
3314
  "name": "user_roles_role_fk",
3495
- "columns": [
3496
- "tenant_id",
3497
- "role_id"
3498
- ],
3315
+ "columns": ["tenant_id", "role_id"],
3499
3316
  "isUnique": false
3500
3317
  },
3501
3318
  "user_roles_organization_fk": {
3502
3319
  "name": "user_roles_organization_fk",
3503
- "columns": [
3504
- "organization_id"
3505
- ],
3320
+ "columns": ["organization_id"],
3506
3321
  "isUnique": false
3507
3322
  }
3508
3323
  },
3509
3324
  "foreignKeys": {},
3510
3325
  "compositePrimaryKeys": {
3511
3326
  "user_roles_pk": {
3512
- "columns": [
3513
- "tenant_id",
3514
- "user_id",
3515
- "role_id",
3516
- "organization_id"
3517
- ],
3327
+ "columns": ["tenant_id", "user_id", "role_id", "organization_id"],
3518
3328
  "name": "user_roles_pk"
3519
3329
  }
3520
3330
  },
@@ -3594,12 +3404,8 @@
3594
3404
  "name": "branding_tenant_id_tenants_id_fk",
3595
3405
  "tableFrom": "branding",
3596
3406
  "tableTo": "tenants",
3597
- "columnsFrom": [
3598
- "tenant_id"
3599
- ],
3600
- "columnsTo": [
3601
- "id"
3602
- ],
3407
+ "columnsFrom": ["tenant_id"],
3408
+ "columnsTo": ["id"],
3603
3409
  "onDelete": "cascade",
3604
3410
  "onUpdate": "no action"
3605
3411
  }
@@ -3660,23 +3466,15 @@
3660
3466
  "name": "custom_text_tenant_id_tenants_id_fk",
3661
3467
  "tableFrom": "custom_text",
3662
3468
  "tableTo": "tenants",
3663
- "columnsFrom": [
3664
- "tenant_id"
3665
- ],
3666
- "columnsTo": [
3667
- "id"
3668
- ],
3469
+ "columnsFrom": ["tenant_id"],
3470
+ "columnsTo": ["id"],
3669
3471
  "onDelete": "cascade",
3670
3472
  "onUpdate": "no action"
3671
3473
  }
3672
3474
  },
3673
3475
  "compositePrimaryKeys": {
3674
3476
  "custom_text_tenant_id_prompt_language_pk": {
3675
- "columns": [
3676
- "tenant_id",
3677
- "prompt",
3678
- "language"
3679
- ],
3477
+ "columns": ["tenant_id", "prompt", "language"],
3680
3478
  "name": "custom_text_tenant_id_prompt_language_pk"
3681
3479
  }
3682
3480
  },
@@ -3800,9 +3598,7 @@
3800
3598
  "indexes": {
3801
3599
  "flows_tenant_id_idx": {
3802
3600
  "name": "flows_tenant_id_idx",
3803
- "columns": [
3804
- "tenant_id"
3805
- ],
3601
+ "columns": ["tenant_id"],
3806
3602
  "isUnique": false
3807
3603
  }
3808
3604
  },
@@ -3811,12 +3607,8 @@
3811
3607
  "name": "flows_tenant_id_tenants_id_fk",
3812
3608
  "tableFrom": "flows",
3813
3609
  "tableTo": "tenants",
3814
- "columnsFrom": [
3815
- "tenant_id"
3816
- ],
3817
- "columnsTo": [
3818
- "id"
3819
- ],
3610
+ "columnsFrom": ["tenant_id"],
3611
+ "columnsTo": ["id"],
3820
3612
  "onDelete": "cascade",
3821
3613
  "onUpdate": "no action"
3822
3614
  }
@@ -3916,9 +3708,7 @@
3916
3708
  "indexes": {
3917
3709
  "forms_tenant_id_idx": {
3918
3710
  "name": "forms_tenant_id_idx",
3919
- "columns": [
3920
- "tenant_id"
3921
- ],
3711
+ "columns": ["tenant_id"],
3922
3712
  "isUnique": false
3923
3713
  }
3924
3714
  },
@@ -3927,12 +3717,8 @@
3927
3717
  "name": "forms_tenant_id_tenants_id_fk",
3928
3718
  "tableFrom": "forms",
3929
3719
  "tableTo": "tenants",
3930
- "columnsFrom": [
3931
- "tenant_id"
3932
- ],
3933
- "columnsTo": [
3934
- "id"
3935
- ],
3720
+ "columnsFrom": ["tenant_id"],
3721
+ "columnsTo": ["id"],
3936
3722
  "onDelete": "cascade",
3937
3723
  "onUpdate": "no action"
3938
3724
  }
@@ -4029,12 +3815,8 @@
4029
3815
  "name": "hooks_tenant_id_tenants_id_fk",
4030
3816
  "tableFrom": "hooks",
4031
3817
  "tableTo": "tenants",
4032
- "columnsFrom": [
4033
- "tenant_id"
4034
- ],
4035
- "columnsTo": [
4036
- "id"
4037
- ],
3818
+ "columnsFrom": ["tenant_id"],
3819
+ "columnsTo": ["id"],
4038
3820
  "onDelete": "cascade",
4039
3821
  "onUpdate": "no action"
4040
3822
  }
@@ -4138,12 +3920,8 @@
4138
3920
  "name": "keys_tenant_id_tenants_id_fk",
4139
3921
  "tableFrom": "keys",
4140
3922
  "tableTo": "tenants",
4141
- "columnsFrom": [
4142
- "tenant_id"
4143
- ],
4144
- "columnsTo": [
4145
- "id"
4146
- ],
3923
+ "columnsFrom": ["tenant_id"],
3924
+ "columnsTo": ["id"],
4147
3925
  "onDelete": "cascade",
4148
3926
  "onUpdate": "no action"
4149
3927
  },
@@ -4151,12 +3929,8 @@
4151
3929
  "name": "keys_connection_connections_id_fk",
4152
3930
  "tableFrom": "keys",
4153
3931
  "tableTo": "connections",
4154
- "columnsFrom": [
4155
- "connection"
4156
- ],
4157
- "columnsTo": [
4158
- "id"
4159
- ],
3932
+ "columnsFrom": ["connection"],
3933
+ "columnsTo": ["id"],
4160
3934
  "onDelete": "cascade",
4161
3935
  "onUpdate": "no action"
4162
3936
  }
@@ -4613,9 +4387,7 @@
4613
4387
  "indexes": {
4614
4388
  "themes_tenant_id_idx": {
4615
4389
  "name": "themes_tenant_id_idx",
4616
- "columns": [
4617
- "tenant_id"
4618
- ],
4390
+ "columns": ["tenant_id"],
4619
4391
  "isUnique": false
4620
4392
  }
4621
4393
  },
@@ -4624,22 +4396,15 @@
4624
4396
  "name": "themes_tenant_id_tenants_id_fk",
4625
4397
  "tableFrom": "themes",
4626
4398
  "tableTo": "tenants",
4627
- "columnsFrom": [
4628
- "tenant_id"
4629
- ],
4630
- "columnsTo": [
4631
- "id"
4632
- ],
4399
+ "columnsFrom": ["tenant_id"],
4400
+ "columnsTo": ["id"],
4633
4401
  "onDelete": "cascade",
4634
4402
  "onUpdate": "no action"
4635
4403
  }
4636
4404
  },
4637
4405
  "compositePrimaryKeys": {
4638
4406
  "themes_pkey": {
4639
- "columns": [
4640
- "tenant_id",
4641
- "themeId"
4642
- ],
4407
+ "columns": ["tenant_id", "themeId"],
4643
4408
  "name": "themes_pkey"
4644
4409
  }
4645
4410
  },
@@ -4684,12 +4449,8 @@
4684
4449
  "name": "universal_login_templates_tenant_id_tenants_id_fk",
4685
4450
  "tableFrom": "universal_login_templates",
4686
4451
  "tableTo": "tenants",
4687
- "columnsFrom": [
4688
- "tenant_id"
4689
- ],
4690
- "columnsTo": [
4691
- "id"
4692
- ],
4452
+ "columnsFrom": ["tenant_id"],
4453
+ "columnsTo": ["id"],
4693
4454
  "onDelete": "cascade",
4694
4455
  "onUpdate": "no action"
4695
4456
  }
@@ -4811,17 +4572,12 @@
4811
4572
  "indexes": {
4812
4573
  "authentication_methods_tenant_user_idx": {
4813
4574
  "name": "authentication_methods_tenant_user_idx",
4814
- "columns": [
4815
- "tenant_id",
4816
- "user_id"
4817
- ],
4575
+ "columns": ["tenant_id", "user_id"],
4818
4576
  "isUnique": false
4819
4577
  },
4820
4578
  "authentication_methods_credential_id_idx": {
4821
4579
  "name": "authentication_methods_credential_id_idx",
4822
- "columns": [
4823
- "credential_id"
4824
- ],
4580
+ "columns": ["credential_id"],
4825
4581
  "isUnique": false
4826
4582
  }
4827
4583
  },
@@ -4830,12 +4586,8 @@
4830
4586
  "name": "authentication_methods_tenant_id_tenants_id_fk",
4831
4587
  "tableFrom": "authentication_methods",
4832
4588
  "tableTo": "tenants",
4833
- "columnsFrom": [
4834
- "tenant_id"
4835
- ],
4836
- "columnsTo": [
4837
- "id"
4838
- ],
4589
+ "columnsFrom": ["tenant_id"],
4590
+ "columnsTo": ["id"],
4839
4591
  "onDelete": "cascade",
4840
4592
  "onUpdate": "no action"
4841
4593
  }
@@ -5054,33 +4806,22 @@
5054
4806
  "indexes": {
5055
4807
  "logs_user_id": {
5056
4808
  "name": "logs_user_id",
5057
- "columns": [
5058
- "user_id"
5059
- ],
4809
+ "columns": ["user_id"],
5060
4810
  "isUnique": false
5061
4811
  },
5062
4812
  "logs_tenant_id": {
5063
4813
  "name": "logs_tenant_id",
5064
- "columns": [
5065
- "tenant_id"
5066
- ],
4814
+ "columns": ["tenant_id"],
5067
4815
  "isUnique": false
5068
4816
  },
5069
4817
  "logs_date": {
5070
4818
  "name": "logs_date",
5071
- "columns": [
5072
- "date"
5073
- ],
4819
+ "columns": ["date"],
5074
4820
  "isUnique": false
5075
4821
  },
5076
4822
  "IDX_logs_tenant_date_type_user": {
5077
4823
  "name": "IDX_logs_tenant_date_type_user",
5078
- "columns": [
5079
- "tenant_id",
5080
- "date",
5081
- "type",
5082
- "user_id"
5083
- ],
4824
+ "columns": ["tenant_id", "date", "type", "user_id"],
5084
4825
  "isUnique": false
5085
4826
  }
5086
4827
  },
@@ -5195,23 +4936,17 @@
5195
4936
  "indexes": {
5196
4937
  "idx_outbox_events_tenant_id": {
5197
4938
  "name": "idx_outbox_events_tenant_id",
5198
- "columns": [
5199
- "tenant_id"
5200
- ],
4939
+ "columns": ["tenant_id"],
5201
4940
  "isUnique": false
5202
4941
  },
5203
4942
  "idx_outbox_events_processed_at": {
5204
4943
  "name": "idx_outbox_events_processed_at",
5205
- "columns": [
5206
- "processed_at"
5207
- ],
4944
+ "columns": ["processed_at"],
5208
4945
  "isUnique": false
5209
4946
  },
5210
4947
  "idx_outbox_events_claimed_by": {
5211
4948
  "name": "idx_outbox_events_claimed_by",
5212
- "columns": [
5213
- "claimed_by"
5214
- ],
4949
+ "columns": ["claimed_by"],
5215
4950
  "isUnique": false
5216
4951
  }
5217
4952
  },
@@ -5220,12 +4955,8 @@
5220
4955
  "name": "outbox_events_tenant_id_tenants_id_fk",
5221
4956
  "tableFrom": "outbox_events",
5222
4957
  "tableTo": "tenants",
5223
- "columnsFrom": [
5224
- "tenant_id"
5225
- ],
5226
- "columnsTo": [
5227
- "id"
5228
- ],
4958
+ "columnsFrom": ["tenant_id"],
4959
+ "columnsTo": ["id"],
5229
4960
  "onDelete": "cascade",
5230
4961
  "onUpdate": "no action"
5231
4962
  }
@@ -5245,4 +4976,4 @@
5245
4976
  "internal": {
5246
4977
  "indexes": {}
5247
4978
  }
5248
- }
4979
+ }