From cc5426e549b44ddc1eefb17aa920b7c2ccc9df32 Mon Sep 17 00:00:00 2001 From: resurtm Date: Mon, 27 May 2013 22:26:20 +0600 Subject: [PATCH] Removed unnecessary code from MSSQL schema. --- framework/yii/db/mssql/Schema.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/framework/yii/db/mssql/Schema.php b/framework/yii/db/mssql/Schema.php index 1991542..ad0f7d4 100644 --- a/framework/yii/db/mssql/Schema.php +++ b/framework/yii/db/mssql/Schema.php @@ -241,15 +241,11 @@ SQL; } foreach ($columns as $column) { $column = $this->loadColumnSchema($column); - if (is_array($table->primaryKey)) { - foreach ($table->primaryKey as $primaryKeyColumn) { - if (strcasecmp($column->name, $primaryKeyColumn) === 0) { - $column->isPrimaryKey = true; - break; - } + foreach ($table->primaryKey as $primaryKey) { + if (strcasecmp($column->name, $primaryKey) === 0) { + $column->isPrimaryKey = true; + break; } - } else { - $column->isPrimaryKey = strcasecmp($column->name, $table->primaryKey) === 0; } if ($column->isPrimaryKey && $column->autoIncrement) { $table->sequenceName = '';