Database troubleshooting
Initialization and troubleshooting
What initialization changes
Dinvolt generates the initial migration after installing dependencies. Initialization accepts only that unchanged initial migration:
| Database state | Result |
|---|---|
| Empty | Creates the known initial tables and real migration history together |
| Exact matching schema and history | Read-only readiness check |
| Existing tables, missing history, or schema drift | Stops for manual review |
| Local schema or migrations changed | Stops; use reviewed regular migrations |
Checks compare columns, defaults, indexes, and constraints, under a transaction lock. Matching table names alone are insufficient. PlanetScale also checks that the application endpoint can read the ready auth schema.
Initialization never deletes existing data, adopts unknown tables, or applies future migrations automatically. The setup summary reports connection and schema readiness separately.
Connection or initialization failed
Your project, credentials, and generated SQL are preserved. Fix the network, permission, or credential issue, then rerun the matching initialization command:
npm run db:initbun run db:initpnpm run db:inityarn run db:initA timeout can leave the commit result uncertain. Retrying inspects the persisted schema/history before taking further action.
Existing schema is incompatible
Compare the saved SQL with the intended database and its migration history. Use an empty database or prepare a reviewed migration/recovery procedure for its existing data.
Keep unrelated objects and genuine migration history intact. Adding fake history or dropping tables to pass readiness checks can lose data.