Prepare the connections
Configure main first and keep credentials outside committed files. Add a second named connection only when it represents a real responsibility.
aml data:status --connection main
aml data:doctor --connection main --json
aml testExercise writes and failures
Create, update, relate, and delete records. Force one validation error and one failed transaction, then confirm that partial data was not committed.
Verify the production target
Run migrations, seeders, status, doctor, and the integration suite against the same database family and version used in production. SQLite-only success does not prove PostgreSQL or MySQL behavior.
SUMMARY
What to remember
- Data gives persistence an explicit, reusable boundary.
- Named connections and DbSet make reads intentional.
- Tracking and transactions commit one coherent unit of work.
- Relations, migrations, seeders, and diagnostics prepare real deployments.