public function actionCreate($name)
{
if (!preg_match('/^\\w+$/', $name)) {
throw new Exception("The migration name should contain letters, digits and/or underscore characters only.");
}
$name = 'm' . gmdate('ymd_His') . '_' . $name;
$file = Yii::getAlias($this->migrationPath) . DIRECTORY_SEPARATOR . $name . '.php';
if ($this->confirm("Create new migration '{$file}'?")) {
$content = $this->renderFile(Yii::getAlias($this->templateFile), ['className' => $name]);
file_put_contents(Yii::getAlias($file), $content);
echo "New migration created successfully.\n";
}
}