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

Migrations #5231

Merged
merged 18 commits into from Jul 5, 2017

Conversation

@nickvergessen
Copy link
Member

nickvergessen commented Jun 2, 2017

  • Order problem with multiple major versions: #5155 (comment)
  • Change one app to test it
  • Bring back oci table/column/index length check from app:check-code
  • Fix tests

Fix #5155

@mention-bot

This comment has been minimized.

Copy link

mention-bot commented Jun 2, 2017

@nickvergessen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @LukasReschke and @MorrisJobke to be potential reviewers.

@nickvergessen nickvergessen force-pushed the migrations branch from 85d793f to 1c7473b Jun 7, 2017

@nextcloud nextcloud deleted a comment from codecov bot Jun 9, 2017

@nickvergessen nickvergessen added this to the Nextcloud 13 milestone Jun 9, 2017

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jun 9, 2017

Codecov Report

Merging #5231 into master will decrease coverage by 16.49%.
The diff coverage is 8.7%.

@@             Coverage Diff              @@
##             master    #5231      +/-   ##
============================================
- Coverage     54.03%   37.54%   -16.5%     
- Complexity    22465    22639     +174     
============================================
  Files          1389     1400      +11     
  Lines         85957    86513     +556     
  Branches       1329     1329              
============================================
- Hits          46449    32479   -13970     
- Misses        39508    54034   +14526
Impacted Files Coverage Δ Complexity Δ
lib/private/Updater.php 0% <0%> (-6.21%) 77 <0> (ø)
core/Command/Db/Migrations/ExecuteCommand.php 0% <0%> (ø) 5 <5> (?)
lib/private/Setup.php 11.48% <0%> (-0.91%) 50 <0> (ø)
...es/lib/Migration/Version1002Date20170607104347.php 0% <0%> (ø) 2 <2> (?)
lib/private/Setup/AbstractDatabase.php 0% <0%> (ø) 18 <2> (+2) ⬆️
core/register_command.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/private/legacy/app.php 52.81% <0%> (-2.16%) 219 <0> (ø)
lib/private/App/CodeChecker/CodeChecker.php 0% <0%> (-28.95%) 14 <1> (+2)
...private/App/CodeChecker/MigrationSchemaChecker.php 0% <0%> (ø) 58 <58> (?)
lib/private/DB/SchemaWrapper.php 0% <0%> (ø) 14 <14> (?)
... and 509 more
@rullzer
Copy link
Member

rullzer left a comment

Awesome stuff. I think we should get this in ASAP to iron out bugs in the dev cycle!

nickvergessen added some commits Jun 1, 2017

Start migrations
Fixme:
- Install and update of apps
- No revert on live systems (debug only)
- Service adjustment to our interface
- Loading via autoloader

Signed-off-by: Joas Schilling <coding@schilljs.com>
Use migrations when there is no database.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
Adjust the code to use our interface and abstract
Signed-off-by: Joas Schilling <coding@schilljs.com>
Use autoloading instead of require_once from a different dir
Signed-off-by: Joas Schilling <coding@schilljs.com>
Fix code issues
Signed-off-by: Joas Schilling <coding@schilljs.com>
Do not allow to go back on productive systems
Signed-off-by: Joas Schilling <coding@schilljs.com>
Add author and copyright
Signed-off-by: Joas Schilling <coding@schilljs.com>
Add a version to migrations, so parallel legacy branches can also hav…
…e migrations

Signed-off-by: Joas Schilling <coding@schilljs.com>
Allow to check the schema in pre and post as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
Move twofactor_backupcodes to migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
Fix dropping tables and handle the prefix automatically
Signed-off-by: Joas Schilling <coding@schilljs.com>
Check the migration files for table, column and index length errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
Update autoloading
Signed-off-by: Joas Schilling <coding@schilljs.com>
Register autoloading before running migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>

nickvergessen added some commits Jun 9, 2017

Fix tests of CodeChecker and MigrationService
Signed-off-by: Joas Schilling <coding@schilljs.com>
Fix the installer tests
Signed-off-by: Joas Schilling <coding@schilljs.com>

@MorrisJobke MorrisJobke force-pushed the migrations branch from 6f5c63d to 0bff4f3 Jul 5, 2017

@MorrisJobke

This comment has been minimized.

Copy link
Member

MorrisJobke commented Jul 5, 2017

I fixed the merge conflict, but now the personal_sections table is not existent. @nickvergessen Could you fix that?

@MorrisJobke

This comment has been minimized.

Copy link
Member

MorrisJobke commented Jul 5, 2017

I did an update from stable12 to this and it caused that error:

Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "class" FROM "oc_personal_sections" WHERE "class" = ? LIMIT 1' with params ["OCA\\FederatedFileSharing\\Settings\\PersonalSection"]: SQLSTATE[HY000]: General error: 1 no such table: oc_personal_sections
@nickvergessen

This comment has been minimized.

Copy link
Member Author

nickvergessen commented Jul 5, 2017

Wonderful, I love merge conflicts and follow up problems.

Add migration for personal settings stuff
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen

This comment has been minimized.

Copy link
Member Author

nickvergessen commented Jul 5, 2017

Fixed, please merge asap.
Then we can move the existing DB to migrations as well and be done with this.

@MorrisJobke
Copy link
Member

MorrisJobke left a comment

Works well

Fix autoloader and namespace test
Signed-off-by: Morris Jobke <hey@morrisjobke.de>

@MorrisJobke MorrisJobke merged commit 60398b9 into master Jul 5, 2017

1 of 2 checks passed

continuous-integration/drone/pr the build failed
Details
Scrutinizer 5 new issues, 3 updated code elements
Details

@MorrisJobke MorrisJobke deleted the migrations branch Jul 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.