android / architecture-components-samples

Samples for Android Architecture Components.
https://d.android.com/arch
Apache License 2.0
23.36k stars 8.28k forks source link

- keeping only one to one migration relation-ship #1090

Open AmolPardeshi99 opened 10 months ago

AmolPardeshi99 commented 10 months ago

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.

google-cla[bot] commented 10 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.