Skip to content
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

Skip migrations when reinstalling missing code #76

Merged
merged 1 commit into from
May 18, 2017

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented May 18, 2017

Because the app was already installed, no migrations must be run at this
stage. Later on, the upgrade process might notice a version change and
run migrations anyway. This part ensures it doesn't happen twice during
the upgrade process.

Tested as follows:

  1. Install 9.1.5 enterprise
  2. Enable user_ldap
  3. Replace the source code with OC 10.0.1RC1 enterprise from tarball
  4. Patch with Auto enable market app on update and improve app update logging core#27930
  5. Patch with Add flag to skip migrations on install core#27934
  6. Patch with this PR here
  7. Edit config.php to point to the correct cert and staging marketplace (if applicable, need the user_ldap app to be there)
  8. Run occ upgrade

Before the fixes: LDAP migrations run twice and getting TableAlreadyExistsException because it tries to create the same tables twice.
After the fix: upgrade went through! LDAP app still enabled.

Because the app was already installed, no migrations must be run at this
stage. Later on, the upgrade process might notice a version change and
run migrations anyway. This part ensures it doesn't happen twice during
the upgrade process.
@tomneedham
Copy link
Member

👍

@PVince81 PVince81 merged commit 69519d4 into master May 18, 2017
@PVince81 PVince81 deleted the reinstall-skipmigrations branch May 18, 2017 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants