From: Daniel Kesselberg Date: Tue, 2 Mar 2021 15:04:44 +0000 (+0100) Subject: Filter tables with other table prefix X-Git-Tag: v21.0.1RC1~94^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=549cefed15d01d990f46cbac1d512ba7fe1e5c4b;p=nextcloud-server.git Filter tables with other table prefix Signed-off-by: Daniel Kesselberg --- diff --git a/lib/private/DB/Migrator.php b/lib/private/DB/Migrator.php index dcf0db89f72..609ed5d6f70 100644 --- a/lib/private/DB/Migrator.php +++ b/lib/private/DB/Migrator.php @@ -181,9 +181,9 @@ class Migrator { /** @var string|AbstractAsset $asset */ $filterExpression = $this->getFilterExpression(); if ($asset instanceof AbstractAsset) { - return preg_match($filterExpression, $asset->getName()) !== false; + return preg_match($filterExpression, $asset->getName()) === 1; } - return preg_match($filterExpression, $asset) !== false; + return preg_match($filterExpression, $asset) === 1; }); return $this->connection->getSchemaManager()->createSchema(); } @@ -210,9 +210,9 @@ class Migrator { /** @var string|AbstractAsset $asset */ $filterExpression = $this->getFilterExpression(); if ($asset instanceof AbstractAsset) { - return preg_match($filterExpression, $asset->getName()) !== false; + return preg_match($filterExpression, $asset->getName()) === 1; } - return preg_match($filterExpression, $asset) !== false; + return preg_match($filterExpression, $asset) === 1; }); $sourceSchema = $connection->getSchemaManager()->createSchema();