mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-04 22:44:53 +01:00
Fixes #8644: Fixed trying to ENABLE/DISABLE TRIGGER ALL on a view in PostgreSQL
This commit is contained in:
committed by
Alexander Makarov
parent
01c84e2ff2
commit
33dfddd0c2
@@ -190,6 +190,8 @@ class QueryBuilder extends \yii\db\QueryBuilder
|
||||
$enable = $check ? 'ENABLE' : 'DISABLE';
|
||||
$schema = $schema ? $schema : $this->db->getSchema()->defaultSchema;
|
||||
$tableNames = $table ? [$table] : $this->db->getSchema()->getTableNames($schema);
|
||||
$viewNames = $this->db->getSchema()->getViewNames($schema);
|
||||
$tableNames = array_diff($tableNames, $viewNames);
|
||||
$command = '';
|
||||
|
||||
foreach ($tableNames as $tableName) {
|
||||
|
||||
Reference in New Issue
Block a user