@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.
- package/dist/drizzle-adapter.cjs +3 -3
- package/dist/drizzle-adapter.mjs +2700 -2518
- package/drizzle/0003_move_disable_signup_to_connection.sql +17 -0
- package/drizzle/meta/0000_snapshot.json +131 -437
- package/drizzle/meta/0001_snapshot.json +131 -437
- package/drizzle/meta/_journal.json +8 -1
- package/package.json +2 -2
- package/src/schema/sqlite/branding.ts +1 -3
- package/src/schema/sqlite/clients.ts +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Backfill: for every client with disable_sign_ups=1, set the new
|
|
2
|
+
-- connection-level disable_signup=true on every connection whose id appears
|
|
3
|
+
-- in the client's `connections` JSON array. After the backfill, drop the
|
|
4
|
+
-- client column. See packages/kysely/migrate/migrations/2026-05-13T10:00:00_move_disable_signup_to_connection.ts
|
|
5
|
+
-- for the matching kysely migration and rationale.
|
|
6
|
+
|
|
7
|
+
UPDATE `connections`
|
|
8
|
+
SET `options` = json_set(coalesce(`options`, '{}'), '$.disable_signup', json('true'))
|
|
9
|
+
WHERE EXISTS (
|
|
10
|
+
SELECT 1
|
|
11
|
+
FROM `clients`, json_each(`clients`.`connections`)
|
|
12
|
+
WHERE `clients`.`tenant_id` = `connections`.`tenant_id`
|
|
13
|
+
AND `clients`.`disable_sign_ups` = 1
|
|
14
|
+
AND json_each.value = `connections`.`id`
|
|
15
|
+
);
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
ALTER TABLE `clients` DROP COLUMN `disable_sign_ups`;
|