mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 20:59:12 +08:00
Merge branch 'master' into docs-ja-0427-2
This commit is contained in:
@@ -467,6 +467,11 @@ abstract class BaseMigrateController extends Controller
|
|||||||
*
|
*
|
||||||
* @param string $name the name of the new migration. This should only contain
|
* @param string $name the name of the new migration. This should only contain
|
||||||
* letters, digits and/or underscores.
|
* letters, digits and/or underscores.
|
||||||
|
*
|
||||||
|
* Note: If the migration name is of a special form, for example create_xxx or
|
||||||
|
* drop_xxx then the generated migration file will contain extra code,
|
||||||
|
* in this case for creating/dropping tables.
|
||||||
|
*
|
||||||
* @throws Exception if the name argument is invalid.
|
* @throws Exception if the name argument is invalid.
|
||||||
*/
|
*/
|
||||||
public function actionCreate($name)
|
public function actionCreate($name)
|
||||||
|
|||||||
@@ -92,8 +92,14 @@ class MigrateController extends BaseMigrateController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array column definition strings used for creating migration code.
|
* @var array column definition strings used for creating migration code.
|
||||||
* The format of each definition is `COLUMN_NAME:COLUMN_TYPE:COLUMN_DECORATOR`.
|
*
|
||||||
* For example, `--fields=name:string(12):notNull` produces a string column of size 12 which is not null.
|
* The format of each definition is `COLUMN_NAME:COLUMN_TYPE:COLUMN_DECORATOR`. Delimiter is `,`.
|
||||||
|
* For example, `--fields="name:string(12):notNull:unique"`
|
||||||
|
* produces a string column of size 12 which is not null and unique values.
|
||||||
|
*
|
||||||
|
* Note: primary key is added automatically and is named id by default.
|
||||||
|
* If you want to use another name you may specify it explicitly like
|
||||||
|
* `--fields="id_key:primaryKey,name:string(12):notNull:unique"`
|
||||||
* @since 2.0.7
|
* @since 2.0.7
|
||||||
*/
|
*/
|
||||||
public $fields = [];
|
public $fields = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user