@@ -263,6 +266,7 @@ class Generator extends \yii\gii\Generator
$rules[]="[['".$columnsList."'], 'unique', 'targetAttribute' => ['".$columnsList."'], 'message' => 'The combination of ".implode(', ',$labels)." and ".$lastLabel." has already been taken.']";
}
}
}
}catch(NotSupportedException$e){
// doesn't support unique indexes information...do nothing
}
...
...
@@ -570,4 +574,20 @@ class Generator extends \yii\gii\Generator
{
returnYii::$app->{$this->db};
}
/**
* Checks if any of the specified columns of an unique index is auto incrementable.
* @param \yii\db\TableSchema $table the table schema
* @param array $columns columns to check for autoIncrement property
* @return boolean whether any of the specified columns is auto incrementable.