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

Projects
None yet
2 participants
@PVince81
Member

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 owncloud/core#27930
  5. Patch with owncloud/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.

Skip migrations when reinstalling missing code
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.

@PVince81 PVince81 added this to the 10.0.1 milestone May 18, 2017

@PVince81 PVince81 referenced this pull request May 18, 2017

Merged

Add flag to skip migrations on install #27934

4 of 9 tasks complete

@PVince81 PVince81 requested review from VicDeo and tomneedham May 18, 2017

@tomneedham

This comment has been minimized.

Show comment
Hide comment
@tomneedham

tomneedham May 18, 2017

Member

👍

Member

tomneedham commented May 18, 2017

👍

@PVince81 PVince81 merged commit 69519d4 into master May 18, 2017

2 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@PVince81 PVince81 deleted the reinstall-skipmigrations branch May 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment