Skip to content

[Feature]: Implement Database Migrations #34

Description

@mowi12

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendenhancementNew feature or requestsuspendedWill not be processed further for the time being but could become relevant again later

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions