Yii Framework Forum: Yii-Users User-Migration Missing - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii-Users User-Migration Missing Rate Topic: ****- 1 Votes

#1 User is offline   aronbos 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 07-January 13

Posted 07 January 2013 - 09:49 AM

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
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 07 January 2013 - 01:33 PM

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).
"Less noise - more signal"
0

#3 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 07 January 2013 - 01:33 PM

/* moved from General Discussion */
"Less noise - more signal"
0

#4 User is offline   aronbos 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 07-January 13

Posted 08 January 2013 - 08:47 AM

View Postjacmoe, on 07 January 2013 - 01:33 PM, said:

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).


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?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users