diff --git a/framework/yii/db/pgsql/Schema.php b/framework/yii/db/pgsql/Schema.php index d7885f2..dbf7237 100644 --- a/framework/yii/db/pgsql/Schema.php +++ b/framework/yii/db/pgsql/Schema.php @@ -225,7 +225,7 @@ SQL; } $citem = [$foreignTable]; foreach ($columns as $idx => $column) { - $citem[$fcolumns[$idx]] = $column; + $citem[$column] = $fcolumns[$idx]; } $table->foreignKeys[] = $citem; }