I think not being able to use the global yiic command to create migration tables can be considered a bug, right?
I think not being able to use the global yiic command to create migration tables can be considered a bug, right?
No, it’s a logic error to use the global yiic command for anything other than global operations:
Hi Qiang,
I am trying to set-up an application over one of our Stage instance and have automated the deployment process by a Ruby Script (Capistrano). The problem where I am stuck is, I am trying to automate the process of running migration by Shell command, but it holds the screen in between asking for approval (when I run; yiic migrate). Can I pass the a command like;
./yiic migrate --yes
I tried the above, but it doesn’t work for me. Please guide.
Hi there,
My framework is in /protected/vendor/yiisoft/yii/framework
After going to:
cd /var/www/myprotect/protected
and running /vendor/yiisoft/yii/framework/yiic migrate create initial
I always get the application.migrations not found
the only way around this was to finally edit yiic.php
and put:
[color="#A9B7C6"]define([/color]‘MIGRATION_PATH’,"/var/www/myproject/protected/migrations"[color="#A9B7C6"])[/color];
then edit
[font="Courier New"][color="#cc7832"][size=2]/var/www/myproject/protected/vendor/yiisoft/yii/framework/cli/commands/MigrateCommand.php[/size][/color][/font]
public function beforeAction($action,$params)
{
$path=Yii::getPathOfAlias($this->migrationPath);
echo '****'.$this->migrationPath.'\n';
echo '****'.is_dir($path);
// if($path===false || !is_dir($path))
// {
// echo 'Error: The migration directory does not exist: '.$this->migrationPath."\n";
// exit(1);
// }
$path=MIGRATION_PATH;
$this->migrationPath=$path;
$yiiVersion=Yii::getVersion();
echo "\nYii Migration Tool v1.0 (based on Yii v{$yiiVersion})\n\n";
return parent::beforeAction($action,$params);
}
[font="Courier New"][color="#cc7832"][b]
[/b][/color][/font]