Create a Neon database
- Create a project in Neon.
- Copy the connection string from the Neon dashboard.
- Set it as
DATABASE_URLinapps/api/.env:
Apply migrations
After settingDATABASE_URL, run the same migration commands you use locally:
Run migrations safely
Be careful running migrations against production from your laptop. Recommended safety practices:- Run migrations from CI (GitHub Actions) instead of local machines.
- Apply migrations only after a successful deploy.
- Use a dedicated “migration” step with environment‑scoped credentials.
- Test migrations on a staging database first.