You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`.
4
+
5
+
## Installation
6
+
7
+
### Composer
8
+
9
+
The preferred way to install this extension is through [Composer](http://getcomposer.org/).
10
+
11
+
Either run:
12
+
```
13
+
composer require yii2-bridge/migrate-command:^0.1
14
+
```
15
+
16
+
or add `"yii2-bridge/migrate-command": "^0.1"` to the require section of your `composer.json`
17
+
18
+
### Using
19
+
20
+
Add a module `Bridge\Migrate\Modules\Module` in the configuration file of the console application to the modules section of the admin module:
21
+
22
+
```php
23
+
'console' => [
24
+
...
25
+
'modules' => [
26
+
'admin' => [
27
+
'class' => \Bridge\Core\BridgeModule::class,
28
+
'modules' => [
29
+
'migrate' => [
30
+
'class' => 'Bridge\Migrate\Modules\Module',
31
+
],
32
+
],
33
+
...
34
+
]
35
+
],
36
+
...
37
+
]
38
+
```
39
+
40
+
To start the migration, just run the command:
41
+
```
42
+
php yii admin/migrate
43
+
```
44
+
45
+
---
46
+
47
+
If you want to run migrations on a shared hosting, you can run as php script through cron.
0 commit comments