From 8dd95d36ea02e65eb9d04969c9ae4e71ea3c1bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 9 Jan 2025 15:06:07 +0100 Subject: [PATCH] fix: Only return $schema if there was changes in migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/Migration/Version19000Date20241029123147.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Migration/Version19000Date20241029123147.php b/lib/Migration/Version19000Date20241029123147.php index f53beaa88..00348cea0 100644 --- a/lib/Migration/Version19000Date20241029123147.php +++ b/lib/Migration/Version19000Date20241029123147.php @@ -16,10 +16,7 @@ class Version19000Date20241029123147 extends SimpleMigrationStep { /** - * @param IOutput $output * @param Closure(): ISchemaWrapper $schemaClosure - * @param array $options - * @return null|ISchemaWrapper */ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ @@ -29,9 +26,10 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table = $schema->getTable('group_folders'); if (!$table->hasIndex('gf_folders_folder_id')) { $table->addUniqueIndex(['folder_id'], 'gf_folders_folder_id'); + return $schema; } } - return $schema; + return null; } }