diff --git a/framework/yii/db/pgsql/Schema.php b/framework/yii/db/pgsql/Schema.php index b1c09d1..8acb7bd 100644 --- a/framework/yii/db/pgsql/Schema.php +++ b/framework/yii/db/pgsql/Schema.php @@ -243,6 +243,9 @@ ORDER BY SQL; $columns = $this->db->createCommand($sql)->queryAll(); + if (empty($columns)) { + return false; + } foreach ($columns as $column) { $column = $this->loadColumnSchema($column); $table->columns[$column->name] = $column;