t31321
t31321

Reputation: 773

I grails migration plugin dbm-update saying "validation error"

I have a hand written migration.
when I try to run it as:

grails dbm-update

I am getting this error:

validation Error

database-migration version:1.3.8

How can I run the migration plugin to be more verbose with the error message?

Update:
I just tried to run the app and get this error

columnDataType is required, 093-add-Type-field.groovy::1418895018124-1::authorName (generated)::(Checksum: 3:81d125287730881fdb5d52cdbd198f68)

but I have defined the data type:

    column(name: "type", type: "varchar(255)") {
                    constraints(nullable: "true")
                }
.
.
addNotNullContraint(tableName: "tableName",columnName:"type");

Upvotes: 1

Views: 444

Answers (1)

t31321
t31321

Reputation: 773

sorry the problem was with the addNotNullContraint

I am using Mysql db so type field is required

so this is correct:

addNotNullContraint(tableName: "tableName",columnName:"type",columnDataType:"varchar(255)");

instead of:

addNotNullContraint(tableName: "tableName",columnName:"type");

details here liquibase

Upvotes: 2

Related Questions