Perform an explicit type conversion in doesFKExists function

This commit is contained in:
Jan Böhmer 2023-04-08 23:32:38 +02:00
parent 036eaf3bae
commit 7f9307feec

View file

@ -147,7 +147,7 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration
}
$sql = "SELECT COUNT(*) FROM information_schema.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = DATABASE() AND CONSTRAINT_NAME = '$fk_name' AND TABLE_NAME = '$table' AND CONSTRAINT_TYPE = 'FOREIGN KEY'";
$result = $this->connection->fetchOne($sql);
$result = (int) $this->connection->fetchOne($sql);
return $result > 0;
}