brackt/scripts
Chris Parsons cd8074ef10 Fix migrate.mjs: run FK conversion unconditionally, not gated on CLERK_SECRET_KEY
The FK conversion (teams.owner_id, commissioners.user_id → UUIDs) and
email_verified update were inside runClerkMigration() which only ran when
CLERK_SECRET_KEY was set. If the key wasn't in the environment at deploy
time, all Clerk IDs were left unconverted, causing UUID parse errors at
runtime.

Split into two functions:
- convertForeignKeys(): always runs, idempotent WHERE clauses
- importClerkOAuthAccounts(): only runs when CLERK_SECRET_KEY is set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 22:41:41 -07:00
..
build-server.mjs refactor: migrate server code from JavaScript to TypeScript with build pipeline 2025-10-18 22:16:04 -07:00
migrate-clerk-passwords.mjs Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
migrate.mjs Fix migrate.mjs: run FK conversion unconditionally, not gated on CLERK_SECRET_KEY 2026-04-24 22:41:41 -07:00
sync-prod-db.sh Load PROD_DATABASE_URL from .env automatically (#259) 2026-04-03 15:38:09 -07:00