yii2-bridge / migrate-command
Run migrate for Bridge
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yii2-bridge/core: ^0.2.5
Requires (Dev)
- phpunit/phpunit: ^5.4
This package is auto-updated.
Last update: 2024-11-17 20:33:01 UTC
README
If you cannot start yii2-bridge/core
migrations using a terminal (especially if your project is on a shared hosting), install this package and start migrating via php
.
Installation
Composer
The preferred way to install this extension is through Composer.
Either run:
composer require yii2-bridge/migrate-command:^0.1.1
or add "yii2-bridge/migrate-command": "^0.1.1"
to the require section of your composer.json
Using
Add a module Bridge\Migrate\Modules\Module
in the configuration file of the console application to the modules section of the admin module:
'console' => [ ... 'modules' => [ 'admin' => [ 'class' => \Bridge\Core\BridgeModule::class, 'modules' => [ 'migrate' => [ 'class' => 'Bridge\Migrate\Modules\Module', ], ], ... ] ], ... ]
To start the migration, just run the command:
php yii admin/migrate
If you want to run migrations on a shared hosting, you can run as php script through cron.
For example for shared hosting PS.kz: