We are talking about the fact that we have already done the project and have a database, but there are no migrations designed according to the rules of yii2.
To solve this problem, you can google and find a ready-made solution. Actually an example of using exactly one of the solutions.
1) Install into the project via composer
"tmukherjee13/yii2-reverse-migration": "*"
2) Update console / config / main.php
'controllerMap' => [ 'migration' => [ 'class' => 'tmukherjee13\migration\console\controllers\MigrationController', 'templateFile' => '@tmukherjee13/migration/views/template.php', ], ],
3) Generate a migration file on a table from the ssh console
yii migration/table your-table-name
- Семенов Александр
- /
- Jun 24, 2019
- /
- 0
- /
- 14426
Popular
Happy New Year and Merry Christmas!
- Dec 30, 2022
SaleEvent Markup
- Nov 23, 2022
We continue to improve the tools of the online store
- Oct 27, 2022
All Comments (0)