Hi there!
First of all, when I fetched last version of yii-user from GIT (github.com, mishamx, yii-user) into my protected/modules directory, it creates a directory called 'yii-user' which appears to be a module. But the entire yii-user documentation uses 'user' as module name, so I decided to rename 'yii-user' to 'user' and many things started to work. If I was not supposed to rename, or having to rename, please tell me what I did wrong...
Second, and that's why I'm here, I'm getting the following error when I issue the migrate command:
Am I missing some step, or is this a yii-user bug?
First of all, when I fetched last version of yii-user from GIT (github.com, mishamx, yii-user) into my protected/modules directory, it creates a directory called 'yii-user' which appears to be a module. But the entire yii-user documentation uses 'user' as module name, so I decided to rename 'yii-user' to 'user' and many things started to work. If I was not supposed to rename, or having to rename, please tell me what I did wrong...
Second, and that's why I'm here, I'm getting the following error when I issue the migrate command:
Quote
*** applying m110810_162301_userTimestampFix
type db: sqlite
> add column create_at TIMESTAMP to table {{users}} ... done (time: 0.001s)
> add column lastvisit_at TIMESTAMP to table {{users}} ... done (time: 0.000s)
> execute SQL: UPDATE {{users}} SET create_at = datetime(createtime, 'unixepoch'), lastvisit_at = datetime(lastvisit, 'unixepoch') ...Exception: CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 unrecognized token: "{". The SQL statement executed was: UPDATE {{users}} SET create_at = datetime(createtime, 'unixepoch'), lastvisit_at = datetime(lastvisit, 'unixepoch') (C:\xampp\yii-1.1.12.b600af\framework\db\CDbCommand.php:354)
#0 C:\xampp\yii-1.1.12.b600af\framework\db\CDbMigration.php(160): CDbCommand->execute(Array)
#1 C:\phpprojects\testdrive\protected\modules\user\migrations\m110810_162301_userTimestampFix.php(32): CDbMigration->execute('UPDATE {{users}...')
#2 C:\xampp\yii-1.1.12.b600af\framework\db\CDbMigration.php(51): m110810_162301_userTimestampFix->safeUp()
#3 C:\xampp\yii-1.1.12.b600af\framework\cli\commands\MigrateCommand.php(386): CDbMigration->up()
#4 C:\xampp\yii-1.1.12.b600af\framework\cli\commands\MigrateCommand.php(110): MigrateCommand->migrateUp('m110810_162301_...')
#5 [internal function]: MigrateCommand->actionUp(Array)
#6 C:\xampp\yii-1.1.12.b600af\framework\console\CConsoleCommand.php(173): ReflectionMethod->invokeArgs(Object(MigrateCommand), Array)
#7 C:\xampp\yii-1.1.12.b600af\framework\console\CConsoleCommandRunner.php(68): CConsoleCommand->run(Array)
#8 C:\xampp\yii-1.1.12.b600af\framework\console\CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#9 C:\xampp\yii-1.1.12.b600af\framework\base\CApplication.php(162): CConsoleApplication->processRequest()
#10 C:\xampp\yii-1.1.12.b600af\framework\yiic.php(34): CApplication->run()
#11 C:\phpprojects\testdrive\protected\yiic.php(7): require_once('C:\xampp\yii-1....')
#12 {main}
*** failed to apply m110810_162301_userTimestampFix (time: 0.113s)
Migration failed. All later migrations are canceled.
type db: sqlite
> add column create_at TIMESTAMP to table {{users}} ... done (time: 0.001s)
> add column lastvisit_at TIMESTAMP to table {{users}} ... done (time: 0.000s)
> execute SQL: UPDATE {{users}} SET create_at = datetime(createtime, 'unixepoch'), lastvisit_at = datetime(lastvisit, 'unixepoch') ...Exception: CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 unrecognized token: "{". The SQL statement executed was: UPDATE {{users}} SET create_at = datetime(createtime, 'unixepoch'), lastvisit_at = datetime(lastvisit, 'unixepoch') (C:\xampp\yii-1.1.12.b600af\framework\db\CDbCommand.php:354)
#0 C:\xampp\yii-1.1.12.b600af\framework\db\CDbMigration.php(160): CDbCommand->execute(Array)
#1 C:\phpprojects\testdrive\protected\modules\user\migrations\m110810_162301_userTimestampFix.php(32): CDbMigration->execute('UPDATE {{users}...')
#2 C:\xampp\yii-1.1.12.b600af\framework\db\CDbMigration.php(51): m110810_162301_userTimestampFix->safeUp()
#3 C:\xampp\yii-1.1.12.b600af\framework\cli\commands\MigrateCommand.php(386): CDbMigration->up()
#4 C:\xampp\yii-1.1.12.b600af\framework\cli\commands\MigrateCommand.php(110): MigrateCommand->migrateUp('m110810_162301_...')
#5 [internal function]: MigrateCommand->actionUp(Array)
#6 C:\xampp\yii-1.1.12.b600af\framework\console\CConsoleCommand.php(173): ReflectionMethod->invokeArgs(Object(MigrateCommand), Array)
#7 C:\xampp\yii-1.1.12.b600af\framework\console\CConsoleCommandRunner.php(68): CConsoleCommand->run(Array)
#8 C:\xampp\yii-1.1.12.b600af\framework\console\CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#9 C:\xampp\yii-1.1.12.b600af\framework\base\CApplication.php(162): CConsoleApplication->processRequest()
#10 C:\xampp\yii-1.1.12.b600af\framework\yiic.php(34): CApplication->run()
#11 C:\phpprojects\testdrive\protected\yiic.php(7): require_once('C:\xampp\yii-1....')
#12 {main}
*** failed to apply m110810_162301_userTimestampFix (time: 0.113s)
Migration failed. All later migrations are canceled.
Am I missing some step, or is this a yii-user bug?