2012-03-20 8 views
1

データベースモデルを変更しようとしていますので、thisチュートリアルに従いました。 Btw私はGrails 1.3.7を使用しています。Grails db-migrationプラグイン

私が走った:

grails install-plugin database-migration 

それは罰金インストール!

しかし、私は走ったとき:あなたは "--add" を欠落している可能性があり

java.io.FileNotFoundException: grails-app\migrations\changelog.groovy (The system cannot find the path specified) 
at java.io.FileOutputStream.open(Native Method) 
at java.io.FileOutputStream.<init>(FileOutputStream.java:212) 
at java.io.FileOutputStream.<init>(FileOutputStream.java:165) 
at java.io.FileWriter.<init>(FileWriter.java:90) 
at _DatabaseMigrationCommon_groovy$_run_closure7.doCall(_DatabaseMigrationCommon_groovy:128) 
at _DatabaseMigrationCommon_groovy$_run_closure7.call(_DatabaseMigrationCommon_groovy) 
at DbmGenerateGormChangelog$_run_closure1_closure2.doCall(DbmGenerateGormChangelog:28) 
at DbmGenerateGormChangelog$_run_closure1_closure2.doCall(DbmGenerateGormChangelog) 
at _DatabaseMigrationCommon_groovy$_run_closure6_closure18.doCall(_DatabaseMigrationCommon_groovy:88) 
at _DatabaseMigrationCommon_groovy$_run_closure6_closure18.doCall(_DatabaseMigrationCommon_groovy) 
at grails.plugin.databasemigration.MigrationUtils.executeInSession(MigrationUtils.groovy:99) 
at grails.plugin.databasemigration.MigrationUtils$executeInSession.call(Unknown Source) 
at _DatabaseMigrationCommon_groovy$_run_closure6.doCall(_DatabaseMigrationCommon_groovy:81) 
at _DatabaseMigrationCommon_groovy$_run_closure6.call(_DatabaseMigrationCommon_groovy) 
at DbmGenerateGormChangelog$_run_closure1.doCall(DbmGenerateGormChangelog:27) 
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) 
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) 
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) 
at gant.Gant.withBuildListeners(Gant.groovy:427) 
at gant.Gant.this$2$withBuildListeners(Gant.groovy) 
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) 
at gant.Gant.dispatch(Gant.groovy:415) 
at gant.Gant.this$2$dispatch(Gant.groovy) 
at gant.Gant.invokeMethod(Gant.groovy) 
at gant.Gant.executeTargets(Gant.groovy:590) 
at gant.Gant.executeTargets(Gant.groovy:589) 

答えて

3

dbm-generate-gorm-changelog --add changelog.groovy 

優れた

dbm-generate-gorm-changelog changelog.groovy 

をそれは私に次のエラーが発生しましたgrailsのデータベース移行のエントリーポイント(grails 'teamによる):http://blog.springsource.org/2011/08/17/countdown-to-grails-2-0-database-migrations/

+0

これを読む前に私は実際にそれを動作させることができましたが、stackoverflowでもそれをドキュメント化するのは良いことです:) – marko

関連する問題