Browse Source

Removed false exception catching.

tags/2.0.0-beta
gevik 12 years ago
parent
commit
d07fd39f7e
  1. 11
      framework/yii/db/pgsql/Schema.php

11
framework/yii/db/pgsql/Schema.php

@ -97,7 +97,7 @@ class Schema extends \yii\db\Schema
$table->schemaName = $this->defaultSchema; $table->schemaName = $this->defaultSchema;
} }
} }
/** /**
* Quotes a table name for use in a query. * Quotes a table name for use in a query.
* A simple table name has no schema prefix. * A simple table name has no schema prefix.
@ -121,7 +121,7 @@ class Schema extends \yii\db\Schema
return $table; return $table;
} }
} }
/** /**
* Collects the foreign key column details for the given table. * Collects the foreign key column details for the given table.
* @param TableSchema $table the table metadata * @param TableSchema $table the table metadata
@ -158,11 +158,7 @@ where
and ns.nspname={$tableSchema} and ns.nspname={$tableSchema}
SQL; SQL;
try { $constraints = $this->db->createCommand($sql)->queryAll();
$constraints = $this->db->createCommand($sql)->queryAll();
} catch (\Exception $e) {
return false;
}
foreach ($constraints as $constraint) { foreach ($constraints as $constraint) {
$columns = explode(',', $constraint['columns']); $columns = explode(',', $constraint['columns']);
$fcolumns = explode(',', $constraint['foreign_columns']); $fcolumns = explode(',', $constraint['foreign_columns']);
@ -172,7 +168,6 @@ SQL;
} }
$table->foreignKeys[] = $citem; $table->foreignKeys[] = $citem;
} }
return true;
} }
/** /**

Loading…
Cancel
Save