Is your request related to a problem? Please describe.
Currently, the backend relies on TypeORM’s synchronize: true option to automatically update the database schema. While this simplifies development, it introduces significant risks in production, including potential data loss and lack of schema version tracking. A more robust and maintainable approach is required for managing schema changes safely across environments.
Describe the solution you'd like
Implement a structured migration workflow to replace synchronize. The backend should support:
- Generating migration files from entity changes.
- Applying migrations consistently across development, staging, and production environments.
- Rolling back migrations if necessary.
This approach ensures database changes are deliberate, version-controlled, and auditable, aligning with best practices for production-ready applications.
Describe alternatives you've considered
No response
Anything else?
Tools such as TypeORM’s migration CLI or other migration frameworks can facilitate this workflow. Recommended practices include generating migrations for each schema change, reviewing them, and applying them in a controlled manner to each environment.
Is your request related to a problem? Please describe.
Currently, the backend relies on TypeORM’s
synchronize: trueoption to automatically update the database schema. While this simplifies development, it introduces significant risks in production, including potential data loss and lack of schema version tracking. A more robust and maintainable approach is required for managing schema changes safely across environments.Describe the solution you'd like
Implement a structured migration workflow to replace
synchronize. The backend should support:This approach ensures database changes are deliberate, version-controlled, and auditable, aligning with best practices for production-ready applications.
Describe alternatives you've considered
No response
Anything else?
Tools such as TypeORM’s migration CLI or other migration frameworks can facilitate this workflow. Recommended practices include generating migrations for each schema change, reviewing them, and applying them in a controlled manner to each environment.