@authhero/drizzle 0.39.0 → 0.41.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.
@@ -5,16 +5,9 @@
5
5
  {
6
6
  "idx": 0,
7
7
  "version": "6",
8
- "when": 1775726716499,
9
- "tag": "0000_good_eternity",
10
- "breakpoints": true
11
- },
12
- {
13
- "idx": 1,
14
- "version": "6",
15
- "when": 1744185600000,
16
- "tag": "0001_add_custom_domains_domain_unique",
8
+ "when": 1776702334667,
9
+ "tag": "0000_watery_loners",
17
10
  "breakpoints": true
18
11
  }
19
12
  ]
20
- }
13
+ }
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.39.0",
14
+ "version": "0.41.0",
15
15
  "files": [
16
16
  "dist",
17
17
  "src/schema",
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "drizzle-orm": "^0.44.2",
36
36
  "nanoid": "^5.0.8",
37
- "@authhero/adapter-interfaces": "1.5.0"
37
+ "@authhero/adapter-interfaces": "1.6.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hono/zod-openapi": "^0.19.2",
@@ -52,6 +52,7 @@ export const refreshTokens = sqliteTable(
52
52
  expires_at_ts: integer("expires_at_ts"),
53
53
  idle_expires_at_ts: integer("idle_expires_at_ts"),
54
54
  last_exchanged_at_ts: integer("last_exchanged_at_ts"),
55
+ revoked_at_ts: integer("revoked_at_ts"),
55
56
  },
56
57
  (table) => [
57
58
  primaryKey({
@@ -73,28 +74,9 @@ export const loginSessions = sqliteTable(
73
74
  .references(() => tenants.id, { onDelete: "cascade" }),
74
75
  session_id: text("session_id", { length: 21 }),
75
76
  csrf_token: text("csrf_token", { length: 21 }).notNull(),
76
- authParams_client_id: text("authParams_client_id", {
77
- length: 191,
78
- }).notNull(),
79
- authParams_vendor_id: text("authParams_vendor_id", { length: 255 }),
80
- authParams_username: text("authParams_username", { length: 255 }),
81
- authParams_response_type: text("authParams_response_type", { length: 255 }),
82
- authParams_response_mode: text("authParams_response_mode", { length: 255 }),
83
- authParams_audience: text("authParams_audience", { length: 255 }),
84
- authParams_scope: text("authParams_scope"),
85
- authParams_state: text("authParams_state"),
86
- authParams_nonce: text("authParams_nonce", { length: 255 }),
87
- authParams_code_challenge_method: text("authParams_code_challenge_method", {
88
- length: 255,
89
- }),
90
- authParams_code_challenge: text("authParams_code_challenge", {
91
- length: 255,
92
- }),
93
- authParams_redirect_uri: text("authParams_redirect_uri"),
94
- authParams_organization: text("authParams_organization", { length: 255 }),
95
- authParams_prompt: text("authParams_prompt", { length: 32 }),
96
- authParams_act_as: text("authParams_act_as", { length: 256 }),
97
- authParams_ui_locales: text("authParams_ui_locales", { length: 32 }),
77
+ // JSON-serialized authParams. Canonical source of truth. Replaces the
78
+ // legacy hoisted authParams_* columns, which were dropped.
79
+ auth_params: text("auth_params"),
98
80
  authorization_url: text("authorization_url"),
99
81
  created_at_ts: integer("created_at_ts").notNull(),
100
82
  updated_at_ts: integer("updated_at_ts").notNull(),
@@ -1,9 +0,0 @@
1
- -- Remove duplicate domain rows, keeping one row per domain (the earliest inserted)
2
- DELETE FROM `custom_domains`
3
- WHERE rowid NOT IN (
4
- SELECT MIN(rowid)
5
- FROM `custom_domains`
6
- GROUP BY `domain`
7
- );
8
-
9
- CREATE UNIQUE INDEX `custom_domains_domain_unique` ON `custom_domains` (`domain`);
@@ -1,7 +0,0 @@
1
- ALTER TABLE `outbox_events` ADD `dead_lettered_at` text(35);--> statement-breakpoint
2
- ALTER TABLE `outbox_events` ADD `final_error` text;--> statement-breakpoint
3
- ALTER TABLE `users` ADD `registration_completed_at` text(35);--> statement-breakpoint
4
- -- Backfill so legacy users don't re-fire post-user-registration on their
5
- -- next login. The null/non-null state is load-bearing (see
6
- -- postUserLoginHook); the exact timestamp is not exposed externally.
7
- UPDATE `users` SET `registration_completed_at` = `created_at` WHERE `registration_completed_at` IS NULL;
@@ -1 +0,0 @@
1
- CREATE INDEX `idx_outbox_events_tenant_dead_lettered` ON `outbox_events` (`tenant_id`,`dead_lettered_at`);