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> |
||
|---|---|---|
| .. | ||
| build-server.mjs | ||
| migrate-clerk-passwords.mjs | ||
| migrate.mjs | ||
| sync-prod-db.sh | ||