Contact Us

Home > Error The > Error The Migration Directory Does Not Exist Application.migrations

Error The Migration Directory Does Not Exist Application.migrations

For proper migrations, the down function is equally as important as the up function. I guess it would be handy if the tutorial could be updated to explicitly explain where to run the command from for the the sake of future readers. 0 Back to What was happening before was that every time I called the command then the one in /yii-1.1.6/framework/ was called hence the path related issues. All later migrations are canceled.\n"; 148 return 2; 149 } 150 } 151 echo "\nMigrated down successfully.\n"; 152 } 153 } 154 155 public function actionRedo($args) 156 { 157 $step=isset($args[0]) ? his comment is here

A member file download can also be achieved by clicking within a package contents listing on the according byte size field. Infinite sum of logs puzzle Why do many statues in Volantis lack heads? This has not been explained in the documentation. Nothing needs to be done.\n"; 262 return 0; 263 } 264 else 265 return $this->actionDown(array($i)); 266 } 267 } 268 269 echo "Error: Unable to find the version '$originalVersion'.\n"; 270 return

I did a probe and noticed that there exists another yiic executable in application/protected directory. the protected/config/console.php has set to 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', I just started to teach myself Yii Saturday evening so I'm a huge noob. When you run migrations from 1.1.6, you must run the yiic from the protected directory in your application tree for migrations to work. Yii will not create this automatically (only if you create a new 1.1.6 app). 0 Back to top of the page up there ^ #10 qiang Yii Project Lead Group:

Defaults to 'tbl_migration'. 42 * The table structure is: (version varchar(180) primary key, apply_time integer) 43 */ 44 public $migrationTable='tbl_migration'; 45 /** 46 * @var string the application component ID that Creating...\n"; if (!IOHelper::createFolder($path)) { echo 'Sorry... If a plugin instance, will get the plugin's migrationhistory.ReturnsmixedGets the migration history for either Craft or aplugin.Overriding Yii's implementation with Craft specificlogic. How does the 11-year solar cycle alter the cosmic ray flux?

I don't think 1.1.6 is created the protected/migrations folder. it should be from protected directory of your project. if (isset($params[0][1])) { $plugin = $params[0][1]; $path = craft()->path->getMigrationsPath($plugin); if (!IOHelper::folderExists($path)) { echo 'The migration folder does not exist at '.$path.". https://gistpages.com/posts/error_the_migration_directory_does_not_exist_application_migrations You signed in with another tab or window.

If your console.php in public_html/config/ than declaration is: Yii::setPathOfAlias('vendor', dirname(__FILE__) . MX record security Make all the statements true EvenSt-ring C ode - g ol!f Why is the spacesuit design so strange in Sunshine? When you create a migrations directory in the Cli folder migrations do work. I have tried the same command in the protected folder but still nothing positive would come out of it. 0 Back to top of the page up there ^ #16

how will I check that? –NEWBIE May 5 '13 at 18:22 In unix/linux you can check ls -la projectpath/protected/migrations What webserver do you use? –Andrei Zhamoida May 5 '13 http://kechengpuzi.com/q/s19682899 tks.screen shots: 发帖者 Lian Deliang 时间: 下午3:38 标签: develop, log, php, yii 发表评论 较新的帖子 较早的帖子 主页 订阅: 帖子评论 (Atom) 搜索此博客 正在加载... 网页浏览总次数 Translate 博客归档 ► 2016 (3) ► 九月 (2) ► Star us at github: 1.1 and 2.0. 0 Back to top of the page up there ^ #7 Donsell Newbie Group: Members Posts: 7 Joined: 17-January 11 Posted 17 January Just to summarize: You need to execute the yiic inside the protected directory There should be an yiic.bat inside the protected directory In some cases, the migration directory inside the protected

I had added the /yii-1.1.6/framework directory to PATH environment variable so as to use the yiic command line tool globally. this content Already have an account? actionUp() # public function actionUp($args) { if (isset($args[0])) { $plugin = $this->_validatePlugin($args[0]); if (craft()->migrations->runToTop($plugin)) { echo "Migrated ".$plugin->getClassHandle()." to top successfully.\n"; return 0; } else { echo "There was a problem What is the best way to upgrade gear in Diablo 3?

To fix this, we should use the yiic file inside the protected folder: protected/yiic.php protected/yiic protected/yiic.php Successfully running migration commands should output the following: php yiic.php migrate create create_deals_table Yii Migration I've attached a diff with those changes. That's intentional. http://vgadownload.com/error-the/error-the-media-miniroot-archive-does-not-exist.html The mortgage company is trying to force us to make repairs after an insurance claim Unusual keyboard in a picture Security Patch SUPEE-8788 - Possible Problems?

The one in the framework folder writes the migrations in cli/migrations. Register Now! If it is then it should not create folder every time it runs.

Defaults to true. 62 * Set this to false when performing migration in a cron job or background process. 63 */ 64 public $interactive=true; 65 66 public function beforeAction($action,$params) 67 {

Yii 2.0 Development Cookbook, Yii 1.1 Application Development Cookbook Enjoying Yii? actionNew() # public function actionNew($args) { $plugin = null; if (isset($args[0])) { $plugin = $this->_validatePlugin($args[0]); } $migrations = $this->getNewMigrations($plugin); if ($migrations === array()) { if ($plugin) { echo "No new migrations Quote I'd also recommend that the comment lines around the down function be removed. I guess it would be handy if the tutorial could be updated to explicitly explain where to run the command from for the the sake of future readers.

Inspirational - good saying =B7=D6=B3=C9=D5=CB=B5=A5 php develop log-yii yiic mirgate Inspirational: Opportunity die in seven words in! 应用发布进展通知(2013年12月13日) daily joke-2013.12.12 应用发布进展通知(2013年12月11日) yii develop log - test CActiveRecord Windows 8 App Award This could be any database changes from table creations, additional fields, dropping fields to adding keys. Yii 2.0 Development Cookbook, Yii 1.1 Application Development Cookbook Enjoying Yii? check over here Your system is up-to-date.\n"; 361 else 362 { 363 $n=count($migrations); 364 if($limit>0 && $n>$limit) 365 { 366 $migrations=array_slice($migrations,0,$limit); 367 echo "Showing $limit out of $n new ".($n===1 ? 'migration' : 'migrations').":\n";

Alternatively you can here view or download the uninterpreted source code file. I did a probe and noticed that there exists another yiic executable in application/protected directory. I mean you should execute cd /project/protected/ before migrate –Ruslan Polutsygan May 5 '13 at 19:47 | show 5 more comments 1 Answer 1 active oldest votes up vote 6 down Yii 2.0 Development Cookbook, Yii 1.1 Application Development Cookbook Enjoying Yii?

Terms Privacy Security Status Help You can't perform that action at this time. I first create the app by issuing the command yiic webapp /path/to/my/dirAfter that I then go to my application folder and issue the commandyiic migrate create sample_migration_script and I still get Nothing needs to be done.\n"; 319 else 320 { 321 if($this->confirm("Set migration history at $originalVersion?")) 322 { 323 $command=$db->createCommand(); 324 for($j=0;$j<$i;++$j) 325 $command->delete($this->migrationTable, $db->quoteColumnName('version').'=:version', array(':version'=>$migrations[$j])); 326 echo "The migration history is Skip to content Ignore Learn more Please note that GitHub no longer supports old versions of Firefox.

Plot output of FourierTransform in mathematica Are independent variables really independent? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. What was happening before was that every time I called the command then the one in /yii-1.1.6/framework/ was called hence the path related issues. How many lawn gnomes do I have?

I have seen where I had it wrong. All later migrations are canceled.orAdd to console.php :'modules'=>array(... 'user'=>array( ... # copy settings from main config ),...),*** failed to apply m110805_153437_installYiiUser (time: 0.005s)2.whyi want to add this plugin: http://www.yiiframework.com/extension/yii-user/ ,my yii Make sure it points to an existing PHP file and the file is readable. (D:\doc\webserver\wwwroot\third\yii\YiiBase.php:322)#0 D:\doc\webserver\wwwroot\third\yii\YiiBase.php(196): YiiBase::import('user.UserModule', true)#1 D:\doc\webserver\wwwroot\third\yii\base\CModule.php(282): YiiBase::createComponent('user.UserModule', 'user', NULL, Array)#2 D:\doc\webserver\wwwroot\mw2\protected\migrations\m110805_153437_installYiiUser.php(10): CModule->getModule('user')#3 D:\doc\webserver\wwwroot\third\yii\db\CDbMigration.php(53): m110805_153437_installYiiUser->safeUp()#4 D:\doc\webserver\wwwroot\third\yii\cli\commands\MigrateCommand.php(386): CDbMigration->up()#5 D:\doc\webserver\wwwroot\third\yii\cli\commands\MigrateCommand.php(110): MigrateCommand->migrateUp('m110805_153437_...')#6 Star us at github: 1.1 and 2.0. 0 Back to top of the page up there ^ #15 Kevin Guto Newbie Group: Members Posts: 11 Joined: 11-January 11 Posted 19

There are no close tags in all framework files. When I run Yiic from the framework folder, Yii::getPathofAlias('application') returns "path to framework"/cli/migrations When I run it from the protected folder it returns "protected/migrations". This is equivalent to 'yiic migrate up'. 547 548 * yiic migrate create create_user_table 549 Creates a new migration named 'create_user_table'. 550 551 * yiic migrate up 3 552 Applies the newMigrations # read-onlyprotected array getNewMigrations(BasePlugin|null $plugin = null)Gets any new migrations for either Craft or aplugin.Overriding Yii's implementation with Craft specificlogic.

I had added the /yii-1.1.6/framework directory to PATH environment variable so as to use the yiic command line tool globally. We recommend upgrading to the latest Safari, Google Chrome, or Firefox. When I installed Yii 1.1.5, I added the framework folder to my path so I didn't have to type the location of yiic all the time. Database Migrations is a term used whenever there are any database changes that occur.