@@ -78,81 +78,31 @@ Starting with yii2-migration v2.0 it is possible to generate updating migration
7878
7979## Command line parameters
8080
81- --migrationPath -p
82-
83- Directory storing the migration classes. _ (default '@app/migrations ')_
84-
85- --migrationNamespace -n
86-
87- Namespace in case of generating namespaced migration. _ (default null)_
88- With this option set ` migrationPath ` is ignored.
89-
90- --defaultDecision -d
91-
92- Default decision what to do in case the file to be generated already exists. _ (default 'n')_
93- Available options are:
94-
95- - 'y' = asks before every existing file, overwrite is default option,
96- - 'n' = asks before every existing file, skip is default option,
97- - 'a' = asks before every existing file, append next number is default option,
98- - 'o' = doesn't ask, all existing files are overwritten,
99- - 's' = doesn't ask, no existing files are overwritten,
100- - 'p' = doesn't ask, all existing files are appended with next number.
101-
102- Both ` create ` and ` update ` action use the same decision mechanism.
103-
104- --templateFile -F
105-
106- Template file for generating create migrations. _ (default '@vendor/bizley /migration/src/views/create_migration.php')_
107-
108- --templateFileUpdate -U
109-
110- [ Updates only] Template file for generating update migrations. _ (default '@vendor/bizley /migration/src/views/update_migration.php')_
111-
112- --useTablePrefix -P
113-
114- Whether the table names generated should consider the ` tablePrefix ` setting of the DB connection. _ (default 1)_
115-
116- --db
117-
118- Application component's ID of the DB connection to use when generating migrations. _ (default 'db')_
119-
120- --migrationTable -t
121-
122- Name of the table for keeping applied migration information. _ (default '{{%migration}}')_
123- The same as in yii\console\controllers\MigrateController::$migrationTable.
124-
125- --migrationNamespaces -N
126-
127- [ Updates only] List of namespaces containing the migration classes. _ (default [ ] )_
128- The same as in yii\console\controllers\BaseMigrateController::$migrationNamespaces.
129-
130- --showOnly -s
131-
132- [ Updates only] Whether to only display changes instead of generating update migration. _ (default 0)_
133-
134- --generalSchema -g
135-
136- Whether to use general column schema instead of database specific. _ (default 0)_
81+ | --command | -alias | description | default value
82+ |----------------------|:------:|-------------------------------------------------------------------------|------------------------------------------------------------
83+ | ` db ` | | Application component's ID of the DB connection to use when generating migrations. | ` 'db' `
84+ | ` migrationPath ` | ` p ` | Directory storing the migration classes. | ` '@app/migrations' `
85+ | ` migrationNamespace ` | ` n ` | Namespace in case of generating namespaced migration. | ` null `
86+ | ` templateFile ` | ` F ` | Template file for generating create migrations. | ` '@vendor/bizley/migration/src/views/create_migration.php' `
87+ | ` templateFileUpdate ` | ` U ` | Template file for generating update migrations. | ` '@vendor/bizley/migration/src/views/update_migration.php' `
88+ | ` useTablePrefix ` | ` P ` | Whether the table names generated should consider the ` tablePrefix ` setting of the DB connection. | ` 1 `
89+ | ` migrationTable ` | ` t ` | Name of the table for keeping applied migration information. | ` '{{%migration}}' `
90+ | ` showOnly ` | ` s ` | Whether to only display changes instead of generating update migration. | ` 0 `
91+ | ` generalSchema ` | ` g ` | Whether to use general column schema instead of database specific (1). | ` 0 `
92+ | ` fixHistory ` | ` h ` | Whether to add migration history entry when migration is generated. | ` 0 `
93+ | ` skipMigrations ` | | List of migrations from the history table that should be skipped during the update process. (2) | ` [] `
94+
95+ (1) Remember that with different database types general column schemas may be generated with different length.
13796
13897> ### MySQL examples:
13998> Column ` varchar(45) `
14099> generalSchema=0: ` $this->string(45) `
141100> generalSchema=1: ` $this->string() `
142101> Column ` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY `
143102> generalSchema=0: ` $this->integer(11)->notNull()->append('AUTO_INCREMENT PRIMARY KEY') `
144- > generalSchema=1: ` $this->primaryKey() `
145-
146- Remember that with different database types general column schemas may be generated with different length.
147-
148- --fixHistory -h
149-
150- Whether to add migration history entry when migration is generated. _ (default 0)_
151-
152- --skipMigrations -k
103+ > generalSchema=1: ` $this->primaryKey() `
153104
154- [ Updates only] List of migrations from the history table that should be skipped during the update process. _ (default [ ] )_
155- Here you can place migrations containing actions that can not be covered by extractor i.e. when there is migration
105+ (2) Here you can place migrations containing actions that can not be covered by extractor i.e. when there is migration
156106setting the RBAC hierarchy with authManager component. Such actions should be kept in separated migration and placed on
157107this list to prevent them from being run during the extraction process.
158108
0 commit comments