Browse Source

Fixes #1242: Gii Model generation added dropped table fields in Postgresql

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
f67ddb17f6
  1. 3
      framework/yii/db/pgsql/Schema.php

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

@ -242,7 +242,6 @@ SQL;
$schemaName = $this->db->quoteValue($table->schemaName);
$sql = <<<SQL
SELECT
current_database() as table_catalog,
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
@ -289,7 +288,7 @@ FROM
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0
a.attnum > 0 and t.typename != ''
and c.relname = {$tableName}
and d.nspname = {$schemaName}
ORDER BY

Loading…
Cancel
Save