Safe migration strategy
- Create isolated test environment (
~/strapi-test) - Point it at production RDS (currently unused)
- Import and verify data in RDS
- Switch production to RDS
- Keep SQLite as rollback for a few days
Gotcha 1: config file type
Strapi projects can have database.js or database.ts. Editing the wrong one has no effect — SQLite data.db keeps getting created despite your PostgreSQL config.
ls config/database.* # check which exists before editingGotcha 2: PostgreSQL SSL on RDS
RDS requires SSL. Two errors you’ll hit:
| Error | Cause | Fix |
|---|---|---|
no pg_hba.conf entry... no encryption | SSL not enabled | Add ssl: { rejectUnauthorized: false } to connection config |
self-signed certificate in certificate chain | RDS uses self-signed certs | Same fix — rejectUnauthorized: false |