I am trying to install yii2 in ubuntu.
yii2 migrate command not working
yii migrate
I am getting Below error
php yii /var/www/event-tracking/migrate
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
Could not open input file: yii
To run specific migration, you can mark(skip) migrations upto just before one you want run. You can mark migration by using one of following command: Using timestamp to specify the migration yii migrate/mark 150101_185401. Using a string that can be parsed by strtotime() yii migrate/mark "2015-01-01 18:54:01"
Migration is the base class for representing a database migration. Migration is designed to be used together with the "yii migrate" command. Each child class of Migration represents an individual database migration which is identified by the child class name.
After you install the application, you have to conduct the following steps to initialize the installed application. You only need to do these once for all.
Execute the init
command and select dev as environment.
php /path/to/yii-application/init
Create a new database and adjust the components.db configuration in common/config/main-local.php
accordingly.
Apply migrations with console command:
yii migrate
or for windows:
php yii migrate
This command should create the table User,and Migration in your database
ref [Yii2 Documentation]
If yii migrate
isn't working, you can also try php yii migrate
as the yii command is just a PHP file that needs to be run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With