-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Quirky schema update issue with MySQL and InnoDB
PostPosted: Wed Nov 10, 2010 6:58 pm 
Newbie

Joined: Wed Nov 10, 2010 6:48 pm
Posts: 2
Hi,

I'm facing this quirky issue with hibernate schema update. Our database tables used to be of the MyIASM table type which do not support foreign keys. However after converting them to InnoDB, the foreign keys are not automatically created by schema update. The are no errors in the log file... it just seems to be ignoring them. Yes schema update is turned on... it will successfully create new columns. I can successfully create a foreign key manually with Navicat. If I create a new database and allow hibernate to generate the DDL, the foreign keys are there! It just seems to affect the databases with tables that we converted to InnoDB.

Any ideas on how to fix this would be much appreciated!!


Top
 Profile  
 
 Post subject: Re: Quirky schema update issue with MySQL and InnoDB
PostPosted: Thu Nov 18, 2010 8:45 pm 
Newbie

Joined: Wed Nov 10, 2010 6:48 pm
Posts: 2
The issue had to do with there being indexes in the tables that were the same name as the foreign keys would be. After removing all those indexes, I was able to create the foreign keys.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.