thedug
January 31, 2010, 11:21pm
1
I have this in my change set:
but i end up with just a key, and no foreign key.
| TaskType | CREATE TABLE `TaskType` (
`id` bigint(20) NOT NULL,
`name` varchar(255) NOT NULL,
`groupAccount_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `FKEB68527FF1F601B3` (`groupAccount_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
What version of liquibase are you using? How are you getting that create table definition? Mysql does create an index and a FK for every FK created. The FK definition may just be listed somewhere else.
Nathan
thedug
January 31, 2010, 11:21pm
3
The FK is definitely not getting created.
I was able to drop the table without any keys.
To generate the create that I inserted in my first post, i used “show create table Task”
I am using liquibase 1.9.5.
I used the ant task to perform the update.
I ended up using … to get it to work.
Strange, I haven’t ran into that before. I’ll look into it more, though.
Nathan
You have to use InnoDB engine when using MYSQL MYISAM does not support foreign keys