mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 23:09:10 +08:00
Removed unnecessary code from MSSQL schema.
This commit is contained in:
@@ -241,15 +241,11 @@ SQL;
|
|||||||
}
|
}
|
||||||
foreach ($columns as $column) {
|
foreach ($columns as $column) {
|
||||||
$column = $this->loadColumnSchema($column);
|
$column = $this->loadColumnSchema($column);
|
||||||
if (is_array($table->primaryKey)) {
|
foreach ($table->primaryKey as $primaryKey) {
|
||||||
foreach ($table->primaryKey as $primaryKeyColumn) {
|
if (strcasecmp($column->name, $primaryKey) === 0) {
|
||||||
if (strcasecmp($column->name, $primaryKeyColumn) === 0) {
|
$column->isPrimaryKey = true;
|
||||||
$column->isPrimaryKey = true;
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$column->isPrimaryKey = strcasecmp($column->name, $table->primaryKey) === 0;
|
|
||||||
}
|
}
|
||||||
if ($column->isPrimaryKey && $column->autoIncrement) {
|
if ($column->isPrimaryKey && $column->autoIncrement) {
|
||||||
$table->sequenceName = '';
|
$table->sequenceName = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user