![]() Mysql> insert into child_table values (1, 1) Ģ. Mysql> alter table child_table add constraint my_fk foreign key (parent_id) references parent_table (parent_id) Mysql> create table child_table (child_id integer primary key, parent_id integer) Mysql> create table parent_table (parent_id integer primary key) Your MySQL connection id is 87477 to server version: 5.0.18 We havebn't been able to determine what this key does, but we know it doesn't enforce referential integrity. statement executes with no errors on MyISAM tables, but doesn't create a foreign key constraint! It creates a "key" on the child table, which shows up as an index (not a constraint) in JDBC DatabaseMetaData. The 5.0.19 we set up for testing yesterday was also defaulting everything to MyISAM. All of the tables in our existing MySQL 5.0.18 database were MyISAM. ![]() MyISAM is the default storage engine on 5.0.19, so you are probably dealing with MyISAM tables. The good news is, the Architect does support reverse engineering foreign keys in MySQL.īut there is bad news: According to the MySQL 5.0.x documentation, you can only have foreign key relationships on InnoDB tables (not MyISAM). ![]() ![]() We've done some testing with various versions of MySQL, and we have been able to reproduce your problem.
0 Comments
Leave a Reply. |