diff --git a/lib/private/DB/Migrator.php b/lib/private/DB/Migrator.php
index dcf0db89f72476d01c96557e9712e6fc6cacf9d8..609ed5d6f708cd59f6a244a6b3e3604ecbcba982 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();