From 6384c54d2c25f66819294026a0f99a407c87efc2 Mon Sep 17 00:00:00 2001 From: Anton Vasiliev Date: Wed, 26 Feb 2020 20:45:46 +0000 Subject: [PATCH] #14862 - Remove condition if table exists --- .../_data/fixtures/Migrations/AbstractMigration.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/_data/fixtures/Migrations/AbstractMigration.php b/tests/_data/fixtures/Migrations/AbstractMigration.php index eab196399ad..9d87e0a6074 100644 --- a/tests/_data/fixtures/Migrations/AbstractMigration.php +++ b/tests/_data/fixtures/Migrations/AbstractMigration.php @@ -78,16 +78,9 @@ public function clear() 'delete from ' . $this->table . ';' ); } else { - $schema = getenv('DATA_POSTGRES_SCHEMA'); - $exists = $this - ->connection - ->query("SELECT to_regclass('$schema.$this->table') AS exists;") - ->fetchColumn(); - if ($exists) { - $this->connection->exec( - 'truncate table ' . $this->table . ' cascade;' - ); - } + $this->connection->exec( + 'truncate table ' . $this->table . ' cascade;' + ); } } }