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:
- Create a set of migrations on Branch A and run node-migrate to apply them.
- Switch to Branch B and create new, separate migrations that are specific to that branch.
- Start the application in Branch B with node-migrate.
- Observe that migrations from Branch A are removed or ignored, as they do not exist in the Branch B migration folder.
Expected Behavior:
- Migrations from each branch should remain intact and unaffected by migrations or startup processes from other branches.
- 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
- Migrations unique to one branch are deleted or disregarded when the application starts on another branch.
- 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.
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:
Expected Behavior:
Actual Behavior
Or maybe i didn't find out how to avoid that problem.