Browse Source

Fixes #1334: foreign key is incorrectly determined for pgsql.

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

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

@ -225,7 +225,7 @@ SQL;
} }
$citem = [$foreignTable]; $citem = [$foreignTable];
foreach ($columns as $idx => $column) { foreach ($columns as $idx => $column) {
$citem[$fcolumns[$idx]] = $column; $citem[$column] = $fcolumns[$idx];
} }
$table->foreignKeys[] = $citem; $table->foreignKeys[] = $citem;
} }

Loading…
Cancel
Save