-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix migations for non-ee installs #3817
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3817 +/- ##
==========================================
- Coverage 79.15% 79.10% -0.05%
==========================================
Files 278 279 +1
Lines 12500 12524 +24
Branches 2773 2782 +9
==========================================
+ Hits 9894 9907 +13
- Misses 2606 2617 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hmmm. Odd, pretty sure i tested that scenario. I was aware of the rollup and (in my head) it was designed to align the tables and get everyone on an even footing. I intentionally did not check for the existence of the table (due to prior statement) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked the field names, references, allow Nulls & cascades for the tables added.
Code wise, review gets approval.
Let me know if you want an interactive test by pulling and firing up a particular version of FF to check the operations explicitly.
Otherwise feel free to merge.
I did test this for the upgrade path specific mentioned in the original issue. And I'm satisfied this is a no-op for existing EE installs. Happy to merge. |
Fixes #3811
PR #3645 introduced a migration on an EE-only model without a check the DB table exists.
For clean installs of 2.1 or later, this wouldn't be a problem because of the baseline migration we added in 2.1.0 that initialises all expected tables for an empty database. The idea was to remove the need to have lots of guards in future migrations. However that baseline wasn't intended to also help upgrade an existing database. And that's what this PR addresses.
For someone who installed pre 2.1.0, without an EE license, they won't have some of the EE tables. This PR does two things:
The net result will be the db structure should be identical for OSS and EE installs so future migrations don't have to worry about that.