Yii-Users User-Migration Missing

I am a newbie starting to use Yii. I looks very nice, but …

I added the extension Yii-user to the default gui demo and applied the changes in the config.files.

I am stuck at the migration. When I use:

protected/yiic migrate --migrationPath=user.migrations

in get

Error: The migration directory does not exist: user.migrations

user.migrations does not exist in the git and the files sytem.

So I used:

protected/yiic migrate

in the webdirectory of the project.

Yii Migration Tool v1.0 (based on Yii v1.1.13)

Creating migration history table "tbl_migration"…done.

Total 2 new migrations to be applied:

m110805_153437_installYiiUser


m110810_162301_userTimestampFix

Apply the above migrations? (yes|no) [no]:yes

I get this error:

Exception: Alias "user.UserModule" is invalid. Make sure it points to an existing PHP file and the file is readable. (/opt/yii/framework/YiiBase.php:316)

#0 /opt/yii/framework/YiiBase.php(196): YiiBase::import(‘user.UserModule’, true)

#1 /opt/yii/framework/base/CModule.php(282): YiiBase::createComponent(‘user.UserModule’, ‘user’, NULL, Array)

#2 /var/www/… /protected/migrations/m110805_153437_installYiiUser.php(10): CModule->getModule(‘user’)

#3 /opt/yii/framework/db/CDbMigration.php(50): m110805_153437_installYiiUser->safeUp()

#4 /opt/yii/framework/cli/commands/MigrateCommand.php(385): CDbMigration->up()

#5 /opt/yii/framework/cli/commands/MigrateCommand.php(109): MigrateCommand->migrateUp(‘m110805_153437_…’)

#6 [internal function]: MigrateCommand->actionUp(Array)

#7 /opt/yii/framework/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs(Object(MigrateCommand), Array)

#8 /opt/yii/framework/console/CConsoleCommandRunner.php(67): CConsoleCommand->run(Array)

#9 /opt/yii/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run(Array)

#10 /opt/yii/framework/base/CApplication.php(169): CConsoleApplication->processRequest()

#11 /opt/yii/framework/yiic.php(33): CApplication->run()

#12 /var/www/… /protected/yiic.php(7): require_once(’/opt/yii/framew…’)

#13 /var/www/… /protected/yiic(4): require_once(’/var/www/… .n…’)

#14 {main}

*** failed to apply m110805_153437_installYiiUser (time: 0.021s)

Can anybody point me in the correct direction?

Aron

You need to add the user module to the console configuration in protected/config because the console application yiic uses the console configuration, not the main configuration (for the web application).

[color="#006400"]/* moved from General Discussion */[/color]

Yes, I did that.

My problem is that I do not know what the target file structure is. So I am guessing and seemingly not correct.

In the webstie Yii-user|extension the latest zip file has a different file structure than r107.zip file.

From r107.zip I guess that the file structure should be protected/modules/user/ with 6 maps like components and data.

Or should I places everything in the map protected and merges the files in the map user?

r107.zip does not have the migration files that the latest version has.

Whatever I do, I am not able to migrate.

So my question is: what is the file stucture when Yii-user is correctly installed?