Skip to content

When upgrading from older version do not go through migration script steps.#11885

Merged
malinajirka merged 1 commit intodevelopfrom
issue/11845-fix-reader-db-update-script
May 12, 2020
Merged

When upgrading from older version do not go through migration script steps.#11885
malinajirka merged 1 commit intodevelopfrom
issue/11845-fix-reader-db-update-script

Conversation

@khaykov
Copy link
Copy Markdown
Contributor

@khaykov khaykov commented May 11, 2020

Fixes #11845

This PR fixes the migration script for reader DB. When we encounter a migration attempt from the version before the migration scripts were introduced, we recreate the tables, and skip the individual migration steps.

To test:

  • Checkout and do a fresh install of version 10.1 of the app (reader DB version 135). Since we were using HelpShipt back then, you might want to comment out the content of this and this methods.
  • Install version from this branch on top of the 10.1. Notice the app does not crash.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link
Copy Markdown

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

You can test the changes on this Pull Request by downloading the APK here.

@khaykov khaykov changed the base branch from develop to release/14.8 May 11, 2020 21:21
@khaykov khaykov changed the base branch from release/14.8 to develop May 11, 2020 21:21
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @khaykov !

I tried to update from 10.1 -> develop and the app crashed.
Then, I tried to udpate from 10.1 -> issue/11845-fix-reader-db-update-script and the app didn't crash.
I also tried to update from 10.1 -> develop and the app crashed -> then I updated to issue/11845-fix-reader-db-update-script and it fixed the issue.

So I can confirm these changes work as expected.

@malinajirka malinajirka merged commit 3b64b0c into develop May 12, 2020
@malinajirka malinajirka deleted the issue/11845-fix-reader-db-update-script branch May 12, 2020 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(ReaderDatabase) RuntimeException: Unable to start activity ComponentInfo{org.wordpress.android/org.wordpress.android.ui.main.WPMain...

2 participants