From bf708aa824bf082f7041039dd1e9c1a3c8a0ef7b Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 27 Nov 2013 11:55:35 -0500 Subject: [PATCH] Fixes #1334: foreign key is incorrectly determined for pgsql. --- framework/yii/db/pgsql/Schema.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }