mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
Fixes #12735: Fixed yii\console\controllers\MigrateController creating multiple primary keys for field bigPrimaryKey:unsigned
This commit is contained in:
@ -462,7 +462,7 @@ class MigrateController extends BaseMigrateController
|
||||
protected function addDefaultPrimaryKey(&$fields)
|
||||
{
|
||||
foreach ($fields as $field) {
|
||||
if ($field['decorators'] === 'primaryKey()' || $field['decorators'] === 'bigPrimaryKey()') {
|
||||
if (false !== strripos($field['decorators'], 'primarykey()')) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user