From bb21e87d2321af184f720200b4f8826892f00055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 20 Nov 2020 15:30:36 +0100 Subject: Migrate files_sharing to migrations and move remote_id to a string in share_external MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .../lib/Migration/Version1011Date20201120125158.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/federatedfilesharing/lib') 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; } } -- cgit v1.2.3