Database ORM Migration (e.g. Hibernate to JPA, TypeORM to Prisma)
Safely migrate from one ORM to another in production.
category:modernization
database
orm
migration
workflow
multi-step
0
Prompt
Use this playbook when modernizing your persistence layer without rewriting the whole application at once. ## Steps: 1. Identify ORM-specific annotations/decorators and configuration. 2. Create equivalent models/entities in the new ORM, mapping relations and indexes. 3. Introduce the new ORM in parallel, behind a feature flag or abstraction layer. 4. Port the most critical read/write paths to use the new ORM. 5. Run extensive integration tests, focusing on transactions and cascading behavior. 6. Gradually switch the default code paths to the new ORM. 7. Remove old ORM dependencies and configuration once fully migrated.