yii\db\Schema::insert() primary key value composition fixed

This commit is contained in:
Klimov Paul
2015-04-20 11:48:51 +03:00
parent 1641919643
commit a0b8f74d2e

View File

@@ -418,7 +418,7 @@ abstract class Schema extends Object
$result[$name] = $this->db->getLastInsertID($tableSchema->sequenceName); $result[$name] = $this->db->getLastInsertID($tableSchema->sequenceName);
break; break;
} else { } else {
$result[$name] = $columns[$name]; $result[$name] = isset($columns[$name]) ? $columns[$name] : $tableSchema->columns[$name]->defaultValue;
} }
} }
return $result; return $result;