- keeping only one to one migration relation-ship #1090
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In practice, it's a good practice to have a one-to-one relationship between the starting version and a migration. Each version should have a unique migration associated with it to ensure clarity and predictability in the migration process.
In this code snippet, it seems like MIGRATION_1_2 is a placeholder for migrating from version 1 to version 2, and MIGRATION_1_4 is a placeholder for migrating from version 1 to version 4. However, having both is redundant and could be misleading.
To address this, it would be better to consolidate these into a single migration from version 1 to version 4, which encompasses all the required changes up to version 4. This single migration would ensure that any device at version 1 would correctly migrate to version 4.
So, it would be more appropriate to have a single migration like MIGRATION_1_4 that encompasses all necessary changes from version 1 to version 4. This helps to avoid potential confusion and ensures a clear migration path for all devices.