Skip to content
Advertisement

yii2 installation – migrate command not working

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

Advertisement

Answer

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]

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement