brackt/scripts
Claude 0f97ab258f
Fix migrate.mjs exiting with code 1 after successful migration
client.end() in the finally block was throwing (postgres driver already
cleaned up connections internally during migrate()), causing an unhandled
rejection and exit code 1 despite the migration succeeding.

- Use explicit process.exit(0)/exit(1) instead of relying on implicit exit
- Wrap both client.end() calls with .catch(() => {}) to tolerate cleanup errors
- Add onnotice: () => {} to suppress noisy NOTICE messages (schema/table
  already exists) that are normal on every idempotent re-run

https://claude.ai/code/session_01ReaqH3o9NVH4QU4qE9WMMQ
2026-04-06 04:24:04 +00:00
..
build-server.mjs refactor: migrate server code from JavaScript to TypeScript with build pipeline 2025-10-18 22:16:04 -07:00
migrate.mjs Fix migrate.mjs exiting with code 1 after successful migration 2026-04-06 04:24:04 +00:00
sync-prod-db.sh Load PROD_DATABASE_URL from .env automatically (#259) 2026-04-03 15:38:09 -07:00