-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Handle owncloud migration to latest release #23044
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9c2e9f2
Add missing table columns
juliusknorr 96071d7
Allow upgrade from oc 10.5
juliusknorr 7518f67
Drop fk constraints on locks table
juliusknorr 83f4f48
Fix missing authtoken scope
juliusknorr f5501ca
Avoid checking for brute force protection capabilities when upgrading
juliusknorr 2607ac3
Allow major/minor match for owncloud version
juliusknorr b983639
Adjust calendars.components to 64 chars
PVince81 0d42d99
Adjust further columns
PVince81 ab43d6a
Adjust execution duration to 0
PVince81 de67719
Drop oc_dav_job_status table
juliusknorr f276ccb
Drop assignable systemtag column
juliusknorr fe80a65
Drop attributes on oc_share table
juliusknorr 76addfa
Add missing mount_id index
juliusknorr 3c9218a
Move authtoken login_name column to varchar(255)
juliusknorr c77e259
Add missing index on oc_cards and rename if it previously existed
juliusknorr 28491ad
Handle oc_dav_properties migration
juliusknorr 9fe94f2
Readd repair steps that are relevant when migrating from ownCloud
juliusknorr 4ef148a
Dump autoloader
juliusknorr 20949d7
Properly migrate from new owncloud avatar location
juliusknorr 0befe07
Change further columns to be nullable with a default of 0
juliusknorr 36ffad5
Make sure the migrations table schema is always checked
juliusknorr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OC\Core\Migrations; | ||
|
||
use Closure; | ||
use OCP\DB\ISchemaWrapper; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\SimpleMigrationStep; | ||
|
||
class Version21000Date20201120141228 extends SimpleMigrationStep { | ||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { | ||
/** @var ISchemaWrapper $schema */ | ||
$schema = $schemaClosure(); | ||
|
||
if ($schema->hasTable('authtoken')) { | ||
$table = $schema->getTable('authtoken'); | ||
$loginNameColumn = $table->getColumn('login_name'); | ||
if ($loginNameColumn->getLength() !== 255) { | ||
$loginNameColumn->setLength(255); | ||
} | ||
$table->changeColumn('type', [ | ||
'notnull' => false, | ||
]); | ||
$table->changeColumn('remember', [ | ||
'notnull' => false, | ||
]); | ||
$table->changeColumn('last_activity', [ | ||
'notnull' => false, | ||
]); | ||
$table->changeColumn('last_check', [ | ||
'notnull' => false, | ||
]); | ||
} | ||
|
||
if ($schema->hasTable('dav_job_status')) { | ||
$schema->dropTable('dav_job_status'); | ||
} | ||
|
||
if ($schema->hasTable('systemtag')) { | ||
$table = $schema->getTable('systemtag'); | ||
if ($table->hasColumn('systemtag')) { | ||
$table->dropColumn('assignable'); | ||
} | ||
} | ||
|
||
if ($schema->hasTable('share')) { | ||
$table = $schema->getTable('share'); | ||
if ($table->hasColumn('attributes')) { | ||
$table->dropColumn('attributes'); | ||
} | ||
} | ||
|
||
if ($schema->hasTable('jobs')) { | ||
$table = $schema->getTable('jobs'); | ||
$table->changeColumn('execution_duration', [ | ||
'notnull' => false, | ||
'default' => 0, | ||
]); | ||
} | ||
|
||
return $schema; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
wrong check, this should be "hasColumn('assignable')"