Skip to content

Branch-Specific Migrations Overwritten on Startup Due to Missing Migrations from Other Branches #124

@S1ngle322

Description

@S1ngle322

When working on different branches during development, we often create branch-specific migrations that are only meant to affect the current branch. However, we’ve encountered a critical issue when switching between branches: migrations from a previous branch are often deleted or altered if they don't exist in the current branch, leading to data inconsistency and potential loss.

Steps to Reproduce:

  1. Create a set of migrations on Branch A and run node-migrate to apply them.
  2. Switch to Branch B and create new, separate migrations that are specific to that branch.
  3. Start the application in Branch B with node-migrate.
  4. Observe that migrations from Branch A are removed or ignored, as they do not exist in the Branch B migration folder.

Expected Behavior:

  1. Migrations from each branch should remain intact and unaffected by migrations or startup processes from other branches.
  2. It would be beneficial if node-migrate provided a way to detect branch-specific migrations or offer a method to manage migrations in isolated environments.

Actual Behavior

  1. Migrations unique to one branch are deleted or disregarded when the application starts on another branch.
  2. This behavior causes data issues and requires additional management to ensure migrations don’t conflict across branches.

Or maybe i didn't find out how to avoid that problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions