Search code examples
phpyii

How to create a migration in YII?


I have just started with YII and I am trying to create a new migration. I am using Xampp and it is located in the d drive of my system.

The command that I am trying to use is:

D:\xampp\php> d:\xampp\htdocs\yii\framework\yiic  migrate create create_project_table

When I run the above command nothing happens, neither do I get an error message nor there is any error.

I did manage to successfully create a shell by using

D:\xampp\php> d:\xampp\htdocs\yii\framework\yiic shell d:\xampp\htdocs\trackstar\index.php

I tried to search for any solution for the migration issue but they all seem to be linux based. Please let me know what I am missing here. Thanks for your help.


Solution

  • I managed to create the migration sucessfully. Turns out that I needed to use the yiic located in the protected folder of my application instead of the yiic located in framework folder of yii. The command that I used is

    D:\xampp\php>D:\xampp\htdocs\trackstar\protected\yiic migrate create create_project_table