我正在使用Grails 2.2.4和db-migrate插件1.3.5。我的数据库是mysql。
与数据库同步的现有模型是:
class User {
String description
}
Hibernate在mysql中创建了一个varchar(255)。我需要一个更长的文本列,所以我做了:
class User {
String description
static mapping = {
description type: 'text'
}
}
然后我运行了dbm-gorm-diff change-column.groovy -add
并收到以下错误。我该怎么办?
| Starting dbm-gorm-diff
| Error org.hibernate.MappingException: No Dialect mapping for JDBC type: 7
| Error at grails.plugin.databasemigration.GormDiff.areEquivalent(GormDiff.groovy:146)
| Error at grails.plugin.databasemigration.GormDiff.isDifferent(GormDiff.groovy:114)
| Error at grails.plugin.databasemigration.GormDiff.compare(GormDiff.groovy:68)
| Error at grails.plugin.databasemigration.ScriptUtils.createAndPrintFixedDiff(ScriptUtils.groovy:244)
| Error at DbmGormDiff$_run_closure1_closure2_closure3.doCall(DbmGormDiff:53)
| Error at grails.plugin.databasemigration.MigrationUtils.executeInSession(MigrationUtils.groovy:132)
| Error at DbmGormDiff$_run_closure1_closure2.doCall(DbmGormDiff:50)
| Error at grails.plugin.databasemigration.ScriptUtils.executeAndWrite(ScriptUtils.groovy:104)
| Error at DbmGormDiff$_run_closure1.doCall(DbmGormDiff:49)
答案 0 :(得分:0)
在@raxith
评论后,使用dbm
将1.3.2
从1.3.8
升级到grails 2.2.5
为我工作
答案 1 :(得分:-1)
您可以将其更改为sqlType
以使dbm-gorm-diff
运行。然后再改回来。关于插件的这种类型的错误,有几个JIRA问题。