Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrations from modules are not executed by yiic migrate command

Tags:

php

migration

yii

I am trying to install a user module in my Yii-based application. To do this, I have to migrate the files from:

webapp/protected/modules/user/migrations

I trying to run yiic migrate --migrationPath=user.migrations, but I'm getting an error:

the migration directory does not exist: user.migrations

I read that I have to set up user.migrations as an alias but I don't know how to do it.

I also read, that migration's default folder is determined bybasePath value, set in main configuration file (protected/config/main.php). I have changed it and it still doesn't work correctly.

What can be wrong?

like image 454
WebQube Avatar asked Oct 07 '12 18:10

WebQube


2 Answers

Try this:

yiic migrate --migrationPath=application.modules.user.migrations

like image 54
Sergey Avatar answered Sep 22 '22 17:09

Sergey


from your Command Line open the yiic of your protected folder. Not the yiic of the framework folder.

like image 39
Mahmoud Zalt Avatar answered Sep 23 '22 17:09

Mahmoud Zalt