Grails 2.1.4 - 数据库迁移 - dbm-gorm-diff出错

时间:2013-03-20 11:43:07

标签: database grails database-migration

我需要更改我的数据库。为此,我安装了数据库迁移插件。

plugins {
   …
   runtime ':database-migration:1.3.2'
}

我找到了关于this plugin.

用法的教程

我的步骤是:

  grails dbm-generate-changelog changelog.groovy
  grails dbm-changelog-sync

在这两个步骤之后,我改变了一个Domain类:

class Event {
     ...
     Date lastAccessed
}

为:

class Event {
     ...
     Date dateCreated
     Date lastUpdated
}

根据我现在需要运行的教程和文档:

grails dbm-gorm-diff

我做了这个

grails dbm-gorm-diff add-timestamps-to-event.groovy --add

在这部分我收到了错误。

堆栈跟踪:

| Starting dbm-gorm-diff
12:38:20,561 - ERROR - org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin  - Error     configuration scaffolding: Error creating bean with name 'instanceControllersApi': Singleton   bean creation not allowed while the singletons of this factory are in destruction (Do not   request a bean from a BeanFactory in a destroy method implementation!)
org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'instanceControllersApi': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
at java.lang.Thread.run(Thread.java:722)

我不知道这是从哪里来的。

非常感谢任何建议。

0 个答案:

没有答案