diff --git a/migrations/Version20161001072726.php b/migrations/Version20161001072726.php index c90604bb3..65e196146 100644 --- a/migrations/Version20161001072726.php +++ b/migrations/Version20161001072726.php @@ -27,7 +27,7 @@ class Version20161001072726 extends WallabagMigration // remove all FK from entry_tag switch (true) { case $platform instanceof MySQLPlatform: - $query = $this->connection->query(" + $query = $this->connection->executeQuery(" SELECT CONSTRAINT_NAME FROM information_schema.key_column_usage WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%' @@ -40,7 +40,7 @@ class Version20161001072726 extends WallabagMigration break; case $platform instanceof PostgreSQLPlatform: // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk - $query = $this->connection->query(" + $query = $this->connection->executeQuery(" SELECT conrelid::regclass AS table_from ,conname ,pg_get_constraintdef(c.oid) @@ -64,7 +64,7 @@ class Version20161001072726 extends WallabagMigration switch (true) { case $platform instanceof MySQLPlatform: - $query = $this->connection->query(" + $query = $this->connection->executeQuery(" SELECT CONSTRAINT_NAME FROM information_schema.key_column_usage WHERE TABLE_NAME = '" . $this->getTable('annotation', WallabagMigration::UN_ESCAPED_TABLE) . "' @@ -79,7 +79,7 @@ class Version20161001072726 extends WallabagMigration break; case $platform instanceof PostgreSQLPlatform: // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk - $query = $this->connection->query(" + $query = $this->connection->executeQuery(" SELECT conrelid::regclass AS table_from ,conname ,pg_get_constraintdef(c.oid) diff --git a/migrations/Version20170719231144.php b/migrations/Version20170719231144.php index 3e8afcf09..91db5d1ea 100644 --- a/migrations/Version20170719231144.php +++ b/migrations/Version20170719231144.php @@ -20,7 +20,7 @@ class Version20170719231144 extends WallabagMigration } // Find tags which need to be merged - $dupTags = $this->connection->query(' + $dupTags = $this->connection->executeQuery(' SELECT LOWER(label) AS lower_label FROM ' . $this->getTable('tag') . ' GROUP BY LOWER(label) @@ -31,7 +31,7 @@ class Version20170719231144 extends WallabagMigration $label = $duplicates['lower_label']; // Retrieve all duplicate tags for a given tag - $tags = $this->connection->query(' + $tags = $this->connection->executeQuery(' SELECT id FROM ' . $this->getTable('tag') . ' WHERE LOWER(label) = :label diff --git a/src/Command/InstallCommand.php b/src/Command/InstallCommand.php index b9a2590dc..4c23d598d 100644 --- a/src/Command/InstallCommand.php +++ b/src/Command/InstallCommand.php @@ -138,7 +138,7 @@ class InstallCommand extends Command // now check if MySQL isn't too old to handle utf8mb4 if ($conn->isConnected() && $conn->getDatabasePlatform() instanceof MySQLPlatform) { - $version = $conn->query('select version()')->fetchOne(); + $version = $conn->executeQuery('select version()')->fetchOne(); $minimalVersion = '5.5.4'; if (false === version_compare($version, $minimalVersion, '>')) { @@ -151,7 +151,7 @@ class InstallCommand extends Command // testing if PostgreSQL > 9.1 if ($conn->isConnected() && $conn->getDatabasePlatform() instanceof PostgreSQLPlatform) { // return version should be like "PostgreSQL 9.5.4 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 8.0.0 (clang-800.0.38), 64-bit" - $version = $conn->query('SELECT version();')->fetchOne(); + $version = $conn->executeQuery('SELECT version();')->fetchOne(); preg_match('/PostgreSQL ([0-9\.]+)/i', $version, $matches);