$rules[]="[['".$columnsList."'], 'unique', 'targetAttribute' => ['".$columnsList."'], 'message' => 'The combination of ".implode(', ',$labels)." and ".$lastLabel." has already been taken.']";
$rules[]="[['".$columnsList."'], 'unique', 'targetAttribute' => ['".$columnsList."'], 'message' => 'The combination of ".implode(', ',$labels)." and ".$lastLabel." has already been taken.']";
}
}
}
}catch(NotSupportedException$e){
...
...
@@ -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.