@authhero/drizzle 0.20.4 → 0.22.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.
|
@@ -80,9 +80,17 @@ CREATE TABLE `users` (
|
|
|
80
80
|
`email_verified` integer NOT NULL,
|
|
81
81
|
`is_social` integer NOT NULL,
|
|
82
82
|
`app_metadata` text(4096) DEFAULT '{}' NOT NULL,
|
|
83
|
-
`user_metadata` text
|
|
83
|
+
`user_metadata` text DEFAULT '{}' NOT NULL,
|
|
84
84
|
`profileData` text(2048),
|
|
85
85
|
`locale` text(255),
|
|
86
|
+
`middle_name` text(100),
|
|
87
|
+
`preferred_username` text(255),
|
|
88
|
+
`profile` text,
|
|
89
|
+
`website` text,
|
|
90
|
+
`gender` text(50),
|
|
91
|
+
`birthdate` text(10),
|
|
92
|
+
`zoneinfo` text(100),
|
|
93
|
+
`address` text,
|
|
86
94
|
PRIMARY KEY(`user_id`, `tenant_id`),
|
|
87
95
|
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
88
96
|
);
|
|
@@ -153,9 +161,9 @@ CREATE TABLE `login_sessions` (
|
|
|
153
161
|
`authParams_act_as` text(256),
|
|
154
162
|
`authParams_ui_locales` text(32),
|
|
155
163
|
`authorization_url` text,
|
|
156
|
-
`
|
|
157
|
-
`
|
|
158
|
-
`
|
|
164
|
+
`created_at_ts` integer NOT NULL,
|
|
165
|
+
`updated_at_ts` integer NOT NULL,
|
|
166
|
+
`expires_at_ts` integer NOT NULL,
|
|
159
167
|
`ip` text(39),
|
|
160
168
|
`useragent` text,
|
|
161
169
|
`auth0Client` text(255),
|
|
@@ -169,9 +177,9 @@ CREATE TABLE `login_sessions` (
|
|
|
169
177
|
--> statement-breakpoint
|
|
170
178
|
CREATE INDEX `login_sessions_id_index` ON `login_sessions` (`id`);--> statement-breakpoint
|
|
171
179
|
CREATE INDEX `login_sessions_state_idx` ON `login_sessions` (`state`);--> statement-breakpoint
|
|
172
|
-
CREATE INDEX `login_sessions_state_updated_idx` ON `login_sessions` (`state`,`
|
|
180
|
+
CREATE INDEX `login_sessions_state_updated_idx` ON `login_sessions` (`state`,`updated_at_ts`);--> statement-breakpoint
|
|
173
181
|
CREATE INDEX `login_sessions_tenant_user_idx` ON `login_sessions` (`tenant_id`,`user_id`);--> statement-breakpoint
|
|
174
|
-
CREATE INDEX `
|
|
182
|
+
CREATE INDEX `idx_login_sessions_expires_at_ts` ON `login_sessions` (`expires_at_ts`);--> statement-breakpoint
|
|
175
183
|
CREATE TABLE `otps` (
|
|
176
184
|
`tenant_id` text(191) NOT NULL,
|
|
177
185
|
`id` text(255) PRIMARY KEY NOT NULL,
|
|
@@ -205,29 +213,29 @@ CREATE TABLE `refresh_tokens` (
|
|
|
205
213
|
`resource_servers` text NOT NULL,
|
|
206
214
|
`device` text NOT NULL,
|
|
207
215
|
`rotating` integer NOT NULL,
|
|
208
|
-
`
|
|
209
|
-
`
|
|
210
|
-
`
|
|
211
|
-
`
|
|
216
|
+
`created_at_ts` integer NOT NULL,
|
|
217
|
+
`expires_at_ts` integer,
|
|
218
|
+
`idle_expires_at_ts` integer,
|
|
219
|
+
`last_exchanged_at_ts` integer,
|
|
212
220
|
PRIMARY KEY(`tenant_id`, `id`),
|
|
213
221
|
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
214
222
|
);
|
|
215
223
|
--> statement-breakpoint
|
|
216
224
|
CREATE INDEX `idx_refresh_tokens_user_id` ON `refresh_tokens` (`tenant_id`,`user_id`);--> statement-breakpoint
|
|
217
225
|
CREATE INDEX `idx_refresh_tokens_session_id` ON `refresh_tokens` (`session_id`);--> statement-breakpoint
|
|
218
|
-
CREATE INDEX `
|
|
226
|
+
CREATE INDEX `idx_refresh_tokens_expires_at_ts` ON `refresh_tokens` (`expires_at_ts`);--> statement-breakpoint
|
|
219
227
|
CREATE TABLE `sessions` (
|
|
220
228
|
`id` text(21) NOT NULL,
|
|
221
229
|
`tenant_id` text(191) NOT NULL,
|
|
222
230
|
`user_id` text(255),
|
|
223
|
-
`
|
|
224
|
-
`
|
|
225
|
-
`
|
|
226
|
-
`
|
|
227
|
-
`
|
|
228
|
-
`
|
|
229
|
-
`
|
|
230
|
-
`
|
|
231
|
+
`created_at_ts` integer NOT NULL,
|
|
232
|
+
`updated_at_ts` integer NOT NULL,
|
|
233
|
+
`expires_at_ts` integer,
|
|
234
|
+
`idle_expires_at_ts` integer,
|
|
235
|
+
`authenticated_at_ts` integer,
|
|
236
|
+
`last_interaction_at_ts` integer,
|
|
237
|
+
`used_at_ts` integer,
|
|
238
|
+
`revoked_at_ts` integer,
|
|
231
239
|
`device` text NOT NULL,
|
|
232
240
|
`clients` text NOT NULL,
|
|
233
241
|
`login_session_id` text(21),
|
|
@@ -237,7 +245,7 @@ CREATE TABLE `sessions` (
|
|
|
237
245
|
--> statement-breakpoint
|
|
238
246
|
CREATE INDEX `IDX_sessions_login_session_id` ON `sessions` (`login_session_id`);--> statement-breakpoint
|
|
239
247
|
CREATE INDEX `idx_sessions_user_id` ON `sessions` (`tenant_id`,`user_id`);--> statement-breakpoint
|
|
240
|
-
CREATE INDEX `
|
|
248
|
+
CREATE INDEX `idx_sessions_expires_at_ts` ON `sessions` (`expires_at_ts`);--> statement-breakpoint
|
|
241
249
|
CREATE TABLE `tickets` (
|
|
242
250
|
`tenant_id` text(191) NOT NULL,
|
|
243
251
|
`id` text(255) PRIMARY KEY NOT NULL,
|
|
@@ -284,6 +292,7 @@ CREATE TABLE `clients` (
|
|
|
284
292
|
`logo_uri` text(2083),
|
|
285
293
|
`is_first_party` integer DEFAULT 0 NOT NULL,
|
|
286
294
|
`oidc_conformant` integer DEFAULT 1 NOT NULL,
|
|
295
|
+
`auth0_conformant` integer DEFAULT 1 NOT NULL,
|
|
287
296
|
`callbacks` text NOT NULL,
|
|
288
297
|
`allowed_origins` text NOT NULL,
|
|
289
298
|
`web_origins` text NOT NULL,
|
|
@@ -511,6 +520,17 @@ CREATE TABLE `branding` (
|
|
|
511
520
|
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
512
521
|
);
|
|
513
522
|
--> statement-breakpoint
|
|
523
|
+
CREATE TABLE `custom_text` (
|
|
524
|
+
`tenant_id` text(191) NOT NULL,
|
|
525
|
+
`prompt` text(64) NOT NULL,
|
|
526
|
+
`language` text(16) NOT NULL,
|
|
527
|
+
`custom_text` text NOT NULL,
|
|
528
|
+
`created_at_ts` integer NOT NULL,
|
|
529
|
+
`updated_at_ts` integer NOT NULL,
|
|
530
|
+
PRIMARY KEY(`tenant_id`, `prompt`, `language`),
|
|
531
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
532
|
+
);
|
|
533
|
+
--> statement-breakpoint
|
|
514
534
|
CREATE TABLE `email_providers` (
|
|
515
535
|
`tenant_id` text(191) PRIMARY KEY NOT NULL,
|
|
516
536
|
`name` text(255) NOT NULL,
|
|
@@ -652,6 +672,14 @@ CREATE TABLE `themes` (
|
|
|
652
672
|
);
|
|
653
673
|
--> statement-breakpoint
|
|
654
674
|
CREATE INDEX `themes_tenant_id_idx` ON `themes` (`tenant_id`);--> statement-breakpoint
|
|
675
|
+
CREATE TABLE `universal_login_templates` (
|
|
676
|
+
`tenant_id` text(191) PRIMARY KEY NOT NULL,
|
|
677
|
+
`body` text NOT NULL,
|
|
678
|
+
`created_at_ts` integer NOT NULL,
|
|
679
|
+
`updated_at_ts` integer NOT NULL,
|
|
680
|
+
FOREIGN KEY (`tenant_id`) REFERENCES `tenants`(`id`) ON UPDATE no action ON DELETE cascade
|
|
681
|
+
);
|
|
682
|
+
--> statement-breakpoint
|
|
655
683
|
CREATE TABLE `logs` (
|
|
656
684
|
`log_id` text(21) PRIMARY KEY NOT NULL,
|
|
657
685
|
`category` text(255),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "6",
|
|
3
3
|
"dialect": "sqlite",
|
|
4
|
-
"id": "
|
|
4
|
+
"id": "347080e8-a144-41f4-b15a-2b9b9b6eed73",
|
|
5
5
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
6
|
"tables": {
|
|
7
7
|
"tenants": {
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
},
|
|
565
565
|
"user_metadata": {
|
|
566
566
|
"name": "user_metadata",
|
|
567
|
-
"type": "text
|
|
567
|
+
"type": "text",
|
|
568
568
|
"primaryKey": false,
|
|
569
569
|
"notNull": true,
|
|
570
570
|
"autoincrement": false,
|
|
@@ -583,6 +583,62 @@
|
|
|
583
583
|
"primaryKey": false,
|
|
584
584
|
"notNull": false,
|
|
585
585
|
"autoincrement": false
|
|
586
|
+
},
|
|
587
|
+
"middle_name": {
|
|
588
|
+
"name": "middle_name",
|
|
589
|
+
"type": "text(100)",
|
|
590
|
+
"primaryKey": false,
|
|
591
|
+
"notNull": false,
|
|
592
|
+
"autoincrement": false
|
|
593
|
+
},
|
|
594
|
+
"preferred_username": {
|
|
595
|
+
"name": "preferred_username",
|
|
596
|
+
"type": "text(255)",
|
|
597
|
+
"primaryKey": false,
|
|
598
|
+
"notNull": false,
|
|
599
|
+
"autoincrement": false
|
|
600
|
+
},
|
|
601
|
+
"profile": {
|
|
602
|
+
"name": "profile",
|
|
603
|
+
"type": "text",
|
|
604
|
+
"primaryKey": false,
|
|
605
|
+
"notNull": false,
|
|
606
|
+
"autoincrement": false
|
|
607
|
+
},
|
|
608
|
+
"website": {
|
|
609
|
+
"name": "website",
|
|
610
|
+
"type": "text",
|
|
611
|
+
"primaryKey": false,
|
|
612
|
+
"notNull": false,
|
|
613
|
+
"autoincrement": false
|
|
614
|
+
},
|
|
615
|
+
"gender": {
|
|
616
|
+
"name": "gender",
|
|
617
|
+
"type": "text(50)",
|
|
618
|
+
"primaryKey": false,
|
|
619
|
+
"notNull": false,
|
|
620
|
+
"autoincrement": false
|
|
621
|
+
},
|
|
622
|
+
"birthdate": {
|
|
623
|
+
"name": "birthdate",
|
|
624
|
+
"type": "text(10)",
|
|
625
|
+
"primaryKey": false,
|
|
626
|
+
"notNull": false,
|
|
627
|
+
"autoincrement": false
|
|
628
|
+
},
|
|
629
|
+
"zoneinfo": {
|
|
630
|
+
"name": "zoneinfo",
|
|
631
|
+
"type": "text(100)",
|
|
632
|
+
"primaryKey": false,
|
|
633
|
+
"notNull": false,
|
|
634
|
+
"autoincrement": false
|
|
635
|
+
},
|
|
636
|
+
"address": {
|
|
637
|
+
"name": "address",
|
|
638
|
+
"type": "text",
|
|
639
|
+
"primaryKey": false,
|
|
640
|
+
"notNull": false,
|
|
641
|
+
"autoincrement": false
|
|
586
642
|
}
|
|
587
643
|
},
|
|
588
644
|
"indexes": {
|
|
@@ -1072,22 +1128,22 @@
|
|
|
1072
1128
|
"notNull": false,
|
|
1073
1129
|
"autoincrement": false
|
|
1074
1130
|
},
|
|
1075
|
-
"
|
|
1076
|
-
"name": "
|
|
1131
|
+
"created_at_ts": {
|
|
1132
|
+
"name": "created_at_ts",
|
|
1077
1133
|
"type": "integer",
|
|
1078
1134
|
"primaryKey": false,
|
|
1079
1135
|
"notNull": true,
|
|
1080
1136
|
"autoincrement": false
|
|
1081
1137
|
},
|
|
1082
|
-
"
|
|
1083
|
-
"name": "
|
|
1138
|
+
"updated_at_ts": {
|
|
1139
|
+
"name": "updated_at_ts",
|
|
1084
1140
|
"type": "integer",
|
|
1085
1141
|
"primaryKey": false,
|
|
1086
1142
|
"notNull": true,
|
|
1087
1143
|
"autoincrement": false
|
|
1088
1144
|
},
|
|
1089
|
-
"
|
|
1090
|
-
"name": "
|
|
1145
|
+
"expires_at_ts": {
|
|
1146
|
+
"name": "expires_at_ts",
|
|
1091
1147
|
"type": "integer",
|
|
1092
1148
|
"primaryKey": false,
|
|
1093
1149
|
"notNull": true,
|
|
@@ -1163,7 +1219,7 @@
|
|
|
1163
1219
|
"name": "login_sessions_state_updated_idx",
|
|
1164
1220
|
"columns": [
|
|
1165
1221
|
"state",
|
|
1166
|
-
"
|
|
1222
|
+
"updated_at_ts"
|
|
1167
1223
|
],
|
|
1168
1224
|
"isUnique": false
|
|
1169
1225
|
},
|
|
@@ -1175,10 +1231,10 @@
|
|
|
1175
1231
|
],
|
|
1176
1232
|
"isUnique": false
|
|
1177
1233
|
},
|
|
1178
|
-
"
|
|
1179
|
-
"name": "
|
|
1234
|
+
"idx_login_sessions_expires_at_ts": {
|
|
1235
|
+
"name": "idx_login_sessions_expires_at_ts",
|
|
1180
1236
|
"columns": [
|
|
1181
|
-
"
|
|
1237
|
+
"expires_at_ts"
|
|
1182
1238
|
],
|
|
1183
1239
|
"isUnique": false
|
|
1184
1240
|
}
|
|
@@ -1434,29 +1490,29 @@
|
|
|
1434
1490
|
"notNull": true,
|
|
1435
1491
|
"autoincrement": false
|
|
1436
1492
|
},
|
|
1437
|
-
"
|
|
1438
|
-
"name": "
|
|
1493
|
+
"created_at_ts": {
|
|
1494
|
+
"name": "created_at_ts",
|
|
1439
1495
|
"type": "integer",
|
|
1440
1496
|
"primaryKey": false,
|
|
1441
1497
|
"notNull": true,
|
|
1442
1498
|
"autoincrement": false
|
|
1443
1499
|
},
|
|
1444
|
-
"
|
|
1445
|
-
"name": "
|
|
1500
|
+
"expires_at_ts": {
|
|
1501
|
+
"name": "expires_at_ts",
|
|
1446
1502
|
"type": "integer",
|
|
1447
1503
|
"primaryKey": false,
|
|
1448
1504
|
"notNull": false,
|
|
1449
1505
|
"autoincrement": false
|
|
1450
1506
|
},
|
|
1451
|
-
"
|
|
1452
|
-
"name": "
|
|
1507
|
+
"idle_expires_at_ts": {
|
|
1508
|
+
"name": "idle_expires_at_ts",
|
|
1453
1509
|
"type": "integer",
|
|
1454
1510
|
"primaryKey": false,
|
|
1455
1511
|
"notNull": false,
|
|
1456
1512
|
"autoincrement": false
|
|
1457
1513
|
},
|
|
1458
|
-
"
|
|
1459
|
-
"name": "
|
|
1514
|
+
"last_exchanged_at_ts": {
|
|
1515
|
+
"name": "last_exchanged_at_ts",
|
|
1460
1516
|
"type": "integer",
|
|
1461
1517
|
"primaryKey": false,
|
|
1462
1518
|
"notNull": false,
|
|
@@ -1479,10 +1535,10 @@
|
|
|
1479
1535
|
],
|
|
1480
1536
|
"isUnique": false
|
|
1481
1537
|
},
|
|
1482
|
-
"
|
|
1483
|
-
"name": "
|
|
1538
|
+
"idx_refresh_tokens_expires_at_ts": {
|
|
1539
|
+
"name": "idx_refresh_tokens_expires_at_ts",
|
|
1484
1540
|
"columns": [
|
|
1485
|
-
"
|
|
1541
|
+
"expires_at_ts"
|
|
1486
1542
|
],
|
|
1487
1543
|
"isUnique": false
|
|
1488
1544
|
}
|
|
@@ -1538,57 +1594,57 @@
|
|
|
1538
1594
|
"notNull": false,
|
|
1539
1595
|
"autoincrement": false
|
|
1540
1596
|
},
|
|
1541
|
-
"
|
|
1542
|
-
"name": "
|
|
1597
|
+
"created_at_ts": {
|
|
1598
|
+
"name": "created_at_ts",
|
|
1543
1599
|
"type": "integer",
|
|
1544
1600
|
"primaryKey": false,
|
|
1545
1601
|
"notNull": true,
|
|
1546
1602
|
"autoincrement": false
|
|
1547
1603
|
},
|
|
1548
|
-
"
|
|
1549
|
-
"name": "
|
|
1604
|
+
"updated_at_ts": {
|
|
1605
|
+
"name": "updated_at_ts",
|
|
1550
1606
|
"type": "integer",
|
|
1551
1607
|
"primaryKey": false,
|
|
1552
1608
|
"notNull": true,
|
|
1553
1609
|
"autoincrement": false
|
|
1554
1610
|
},
|
|
1555
|
-
"
|
|
1556
|
-
"name": "
|
|
1611
|
+
"expires_at_ts": {
|
|
1612
|
+
"name": "expires_at_ts",
|
|
1557
1613
|
"type": "integer",
|
|
1558
1614
|
"primaryKey": false,
|
|
1559
1615
|
"notNull": false,
|
|
1560
1616
|
"autoincrement": false
|
|
1561
1617
|
},
|
|
1562
|
-
"
|
|
1563
|
-
"name": "
|
|
1618
|
+
"idle_expires_at_ts": {
|
|
1619
|
+
"name": "idle_expires_at_ts",
|
|
1564
1620
|
"type": "integer",
|
|
1565
1621
|
"primaryKey": false,
|
|
1566
1622
|
"notNull": false,
|
|
1567
1623
|
"autoincrement": false
|
|
1568
1624
|
},
|
|
1569
|
-
"
|
|
1570
|
-
"name": "
|
|
1625
|
+
"authenticated_at_ts": {
|
|
1626
|
+
"name": "authenticated_at_ts",
|
|
1571
1627
|
"type": "integer",
|
|
1572
1628
|
"primaryKey": false,
|
|
1573
1629
|
"notNull": false,
|
|
1574
1630
|
"autoincrement": false
|
|
1575
1631
|
},
|
|
1576
|
-
"
|
|
1577
|
-
"name": "
|
|
1632
|
+
"last_interaction_at_ts": {
|
|
1633
|
+
"name": "last_interaction_at_ts",
|
|
1578
1634
|
"type": "integer",
|
|
1579
1635
|
"primaryKey": false,
|
|
1580
1636
|
"notNull": false,
|
|
1581
1637
|
"autoincrement": false
|
|
1582
1638
|
},
|
|
1583
|
-
"
|
|
1584
|
-
"name": "
|
|
1639
|
+
"used_at_ts": {
|
|
1640
|
+
"name": "used_at_ts",
|
|
1585
1641
|
"type": "integer",
|
|
1586
1642
|
"primaryKey": false,
|
|
1587
1643
|
"notNull": false,
|
|
1588
1644
|
"autoincrement": false
|
|
1589
1645
|
},
|
|
1590
|
-
"
|
|
1591
|
-
"name": "
|
|
1646
|
+
"revoked_at_ts": {
|
|
1647
|
+
"name": "revoked_at_ts",
|
|
1592
1648
|
"type": "integer",
|
|
1593
1649
|
"primaryKey": false,
|
|
1594
1650
|
"notNull": false,
|
|
@@ -1632,10 +1688,10 @@
|
|
|
1632
1688
|
],
|
|
1633
1689
|
"isUnique": false
|
|
1634
1690
|
},
|
|
1635
|
-
"
|
|
1636
|
-
"name": "
|
|
1691
|
+
"idx_sessions_expires_at_ts": {
|
|
1692
|
+
"name": "idx_sessions_expires_at_ts",
|
|
1637
1693
|
"columns": [
|
|
1638
|
-
"
|
|
1694
|
+
"expires_at_ts"
|
|
1639
1695
|
],
|
|
1640
1696
|
"isUnique": false
|
|
1641
1697
|
}
|
|
@@ -1987,6 +2043,14 @@
|
|
|
1987
2043
|
"autoincrement": false,
|
|
1988
2044
|
"default": 1
|
|
1989
2045
|
},
|
|
2046
|
+
"auth0_conformant": {
|
|
2047
|
+
"name": "auth0_conformant",
|
|
2048
|
+
"type": "integer",
|
|
2049
|
+
"primaryKey": false,
|
|
2050
|
+
"notNull": true,
|
|
2051
|
+
"autoincrement": false,
|
|
2052
|
+
"default": 1
|
|
2053
|
+
},
|
|
1990
2054
|
"callbacks": {
|
|
1991
2055
|
"name": "callbacks",
|
|
1992
2056
|
"type": "text",
|
|
@@ -3520,6 +3584,81 @@
|
|
|
3520
3584
|
"uniqueConstraints": {},
|
|
3521
3585
|
"checkConstraints": {}
|
|
3522
3586
|
},
|
|
3587
|
+
"custom_text": {
|
|
3588
|
+
"name": "custom_text",
|
|
3589
|
+
"columns": {
|
|
3590
|
+
"tenant_id": {
|
|
3591
|
+
"name": "tenant_id",
|
|
3592
|
+
"type": "text(191)",
|
|
3593
|
+
"primaryKey": false,
|
|
3594
|
+
"notNull": true,
|
|
3595
|
+
"autoincrement": false
|
|
3596
|
+
},
|
|
3597
|
+
"prompt": {
|
|
3598
|
+
"name": "prompt",
|
|
3599
|
+
"type": "text(64)",
|
|
3600
|
+
"primaryKey": false,
|
|
3601
|
+
"notNull": true,
|
|
3602
|
+
"autoincrement": false
|
|
3603
|
+
},
|
|
3604
|
+
"language": {
|
|
3605
|
+
"name": "language",
|
|
3606
|
+
"type": "text(16)",
|
|
3607
|
+
"primaryKey": false,
|
|
3608
|
+
"notNull": true,
|
|
3609
|
+
"autoincrement": false
|
|
3610
|
+
},
|
|
3611
|
+
"custom_text": {
|
|
3612
|
+
"name": "custom_text",
|
|
3613
|
+
"type": "text",
|
|
3614
|
+
"primaryKey": false,
|
|
3615
|
+
"notNull": true,
|
|
3616
|
+
"autoincrement": false
|
|
3617
|
+
},
|
|
3618
|
+
"created_at_ts": {
|
|
3619
|
+
"name": "created_at_ts",
|
|
3620
|
+
"type": "integer",
|
|
3621
|
+
"primaryKey": false,
|
|
3622
|
+
"notNull": true,
|
|
3623
|
+
"autoincrement": false
|
|
3624
|
+
},
|
|
3625
|
+
"updated_at_ts": {
|
|
3626
|
+
"name": "updated_at_ts",
|
|
3627
|
+
"type": "integer",
|
|
3628
|
+
"primaryKey": false,
|
|
3629
|
+
"notNull": true,
|
|
3630
|
+
"autoincrement": false
|
|
3631
|
+
}
|
|
3632
|
+
},
|
|
3633
|
+
"indexes": {},
|
|
3634
|
+
"foreignKeys": {
|
|
3635
|
+
"custom_text_tenant_id_tenants_id_fk": {
|
|
3636
|
+
"name": "custom_text_tenant_id_tenants_id_fk",
|
|
3637
|
+
"tableFrom": "custom_text",
|
|
3638
|
+
"tableTo": "tenants",
|
|
3639
|
+
"columnsFrom": [
|
|
3640
|
+
"tenant_id"
|
|
3641
|
+
],
|
|
3642
|
+
"columnsTo": [
|
|
3643
|
+
"id"
|
|
3644
|
+
],
|
|
3645
|
+
"onDelete": "cascade",
|
|
3646
|
+
"onUpdate": "no action"
|
|
3647
|
+
}
|
|
3648
|
+
},
|
|
3649
|
+
"compositePrimaryKeys": {
|
|
3650
|
+
"custom_text_tenant_id_prompt_language_pk": {
|
|
3651
|
+
"columns": [
|
|
3652
|
+
"tenant_id",
|
|
3653
|
+
"prompt",
|
|
3654
|
+
"language"
|
|
3655
|
+
],
|
|
3656
|
+
"name": "custom_text_tenant_id_prompt_language_pk"
|
|
3657
|
+
}
|
|
3658
|
+
},
|
|
3659
|
+
"uniqueConstraints": {},
|
|
3660
|
+
"checkConstraints": {}
|
|
3661
|
+
},
|
|
3523
3662
|
"email_providers": {
|
|
3524
3663
|
"name": "email_providers",
|
|
3525
3664
|
"columns": {
|
|
@@ -4483,6 +4622,58 @@
|
|
|
4483
4622
|
"uniqueConstraints": {},
|
|
4484
4623
|
"checkConstraints": {}
|
|
4485
4624
|
},
|
|
4625
|
+
"universal_login_templates": {
|
|
4626
|
+
"name": "universal_login_templates",
|
|
4627
|
+
"columns": {
|
|
4628
|
+
"tenant_id": {
|
|
4629
|
+
"name": "tenant_id",
|
|
4630
|
+
"type": "text(191)",
|
|
4631
|
+
"primaryKey": true,
|
|
4632
|
+
"notNull": true,
|
|
4633
|
+
"autoincrement": false
|
|
4634
|
+
},
|
|
4635
|
+
"body": {
|
|
4636
|
+
"name": "body",
|
|
4637
|
+
"type": "text",
|
|
4638
|
+
"primaryKey": false,
|
|
4639
|
+
"notNull": true,
|
|
4640
|
+
"autoincrement": false
|
|
4641
|
+
},
|
|
4642
|
+
"created_at_ts": {
|
|
4643
|
+
"name": "created_at_ts",
|
|
4644
|
+
"type": "integer",
|
|
4645
|
+
"primaryKey": false,
|
|
4646
|
+
"notNull": true,
|
|
4647
|
+
"autoincrement": false
|
|
4648
|
+
},
|
|
4649
|
+
"updated_at_ts": {
|
|
4650
|
+
"name": "updated_at_ts",
|
|
4651
|
+
"type": "integer",
|
|
4652
|
+
"primaryKey": false,
|
|
4653
|
+
"notNull": true,
|
|
4654
|
+
"autoincrement": false
|
|
4655
|
+
}
|
|
4656
|
+
},
|
|
4657
|
+
"indexes": {},
|
|
4658
|
+
"foreignKeys": {
|
|
4659
|
+
"universal_login_templates_tenant_id_tenants_id_fk": {
|
|
4660
|
+
"name": "universal_login_templates_tenant_id_tenants_id_fk",
|
|
4661
|
+
"tableFrom": "universal_login_templates",
|
|
4662
|
+
"tableTo": "tenants",
|
|
4663
|
+
"columnsFrom": [
|
|
4664
|
+
"tenant_id"
|
|
4665
|
+
],
|
|
4666
|
+
"columnsTo": [
|
|
4667
|
+
"id"
|
|
4668
|
+
],
|
|
4669
|
+
"onDelete": "cascade",
|
|
4670
|
+
"onUpdate": "no action"
|
|
4671
|
+
}
|
|
4672
|
+
},
|
|
4673
|
+
"compositePrimaryKeys": {},
|
|
4674
|
+
"uniqueConstraints": {},
|
|
4675
|
+
"checkConstraints": {}
|
|
4676
|
+
},
|
|
4486
4677
|
"logs": {
|
|
4487
4678
|
"name": "logs",
|
|
4488
4679
|
"columns": {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.22.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"src/schema",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"drizzle-orm": "^0.44.2",
|
|
44
|
-
"@authhero/adapter-interfaces": "0.
|
|
44
|
+
"@authhero/adapter-interfaces": "0.130.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsc && vite build",
|
|
@@ -271,3 +271,18 @@ export const keys = sqliteTable("keys", {
|
|
|
271
271
|
{ onDelete: "cascade" },
|
|
272
272
|
),
|
|
273
273
|
});
|
|
274
|
+
|
|
275
|
+
export const customText = sqliteTable(
|
|
276
|
+
"custom_text",
|
|
277
|
+
{
|
|
278
|
+
tenant_id: text("tenant_id", { length: 191 })
|
|
279
|
+
.notNull()
|
|
280
|
+
.references(() => tenants.id, { onDelete: "cascade" }),
|
|
281
|
+
prompt: text("prompt", { length: 64 }).notNull(),
|
|
282
|
+
language: text("language", { length: 16 }).notNull(),
|
|
283
|
+
custom_text: text("custom_text").notNull(),
|
|
284
|
+
created_at_ts: integer("created_at_ts").notNull(),
|
|
285
|
+
updated_at_ts: integer("updated_at_ts").notNull(),
|
|
286
|
+
},
|
|
287
|
+
(table) => [primaryKey({ columns: [table.tenant_id, table.prompt, table.language] })],
|
|
288
|
+
);
|
|
@@ -49,6 +49,8 @@ export const users = sqliteTable(
|
|
|
49
49
|
gender: text("gender", { length: 50 }),
|
|
50
50
|
birthdate: text("birthdate", { length: 10 }), // ISO 8601:2004 YYYY-MM-DD
|
|
51
51
|
zoneinfo: text("zoneinfo", { length: 100 }), // e.g., "Europe/Paris"
|
|
52
|
+
// OIDC address claim (OIDC Core 5.1.1) - stored as JSON string
|
|
53
|
+
address: text("address"),
|
|
52
54
|
},
|
|
53
55
|
(table) => [
|
|
54
56
|
primaryKey({
|