Arthur Neves
Arthur Neves

Reputation: 12128

grails not generating foreign keys

I`m really confused here about this weird behavior! The thing is, I have a grails app which in my local machine it is creating all FK in my MYSQL db.

But when I try running it in another machines the FK are not being created!

Some reason for that? some permission problem? is there any way to debug the creation of the grails tables so I can figure this out?

thanks!

Upvotes: 1

Views: 243

Answers (1)

Rob Hruska
Rob Hruska

Reputation: 120286

Your database is probably using ENGINE = MyISAM, which will cause foreign keys to not be created.

Try changing your engine to InnoDB.

Upvotes: 3

Related Questions