diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-11-20 15:30:36 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-12-08 16:05:52 +0100 |
commit | bb21e87d2321af184f720200b4f8826892f00055 (patch) | |
tree | 8245742b619211626195caef931a0827eb2535e8 /apps/federatedfilesharing/lib | |
parent | f68f67f354a163574c56b55245d3473ebba79cea (diff) | |
download | nextcloud-server-bb21e87d2321af184f720200b4f8826892f00055.tar.gz nextcloud-server-bb21e87d2321af184f720200b4f8826892f00055.zip |
Migrate files_sharing to migrations and move remote_id to a string in share_external
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r-- | apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php index c3fc22db8e4..1f32f2cced2 100644 --- a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php +++ b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php @@ -36,16 +36,18 @@ class Version1011Date20201120125158 extends SimpleMigrationStep { public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - + if ($schema->hasTable('federated_reshares')) { $table = $schema->getTable('federated_reshares'); $remoteIdColumn = $table->getColumn('remote_id'); if ($remoteIdColumn && $remoteIdColumn->getType()->getName() !== Types::STRING) { $remoteIdColumn->setType(Type::getType(Types::STRING)); $remoteIdColumn->setOptions(['length' => 255]); + $remoteIdColumn->setDefault(''); + return $schema; } } - return $schema; + return null; } } |