2

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

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

我找到了一个关于这个插件使用的教程。

我的步骤是:

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

在这两个步骤之后,我更改了一个域类:

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)

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

非常感谢您的任何建议。

4

0 回答 0