I’m not sure what you mean by “tablename_ibfk_3 kind of relations” - I’m accustomed to seeing auto-discovered relations named like “db_foo_to_bar” (where foo and bar are table names). At the moment new ones are showing i the index like “0_4577” and in their edit dialogue with no name - quiet “odd”. FWIW, I’m using mysql “4.0.13-log” - it used to work just fine.
I just reporduced this by creating a fresh database with the appended script, creating a db server pointing to it, creating a new solution (just one table) then invoking “Create” of “database Defined Relations”. The three discovered relations appear in trhe index as 0_4577, 0_4574 and 0_4575. See attached screen shot.
Any ideas?
Thanks,
Neale.
-- Created by dia2sql.pl v1.2-5ntb1 (Fri Apr 23 11:18:55 EST 2004)
--
-- Table structure for table 'post_print_states'
--
CREATE TABLE post_print_states (
pp_states_id INTEGER AUTO_INCREMENT NOT NULL,
pp_state_code CHAR(3) NOT NULL,
pp_state_desc VARCHAR(50),
PRIMARY KEY(pp_states_id),
INDEX pp_state_code_idx (pp_state_code)
) TYPE=INNODB;
--
-- Table structure for table 'post_print_types'
--
CREATE TABLE post_print_types (
pp_type_id INTEGER AUTO_INCREMENT NOT NULL,
pp_type_code CHAR(1) NOT NULL,
pp_type_desc VARCHAR(50),
PRIMARY KEY(pp_type_id),
INDEX pp_type_code_idx (pp_type_code)
) TYPE=INNODB;
--
-- Table structure for table 'post_apdata'
--
CREATE TABLE post_apdata (
post_apd_id INTEGER AUTO_INCREMENT NOT NULL,
post_apd_pcode NUMERIC(4),
post_apd_locality VARCHAR(40),
post_apd_state CHAR(3),
post_apd_comments VARCHAR(40),
post_apd_deliveryoffice VARCHAR(40),
post_apd_psi NUMERIC(3),
post_apd_parcelzone CHAR(2),
post_apd_bspnum NUMERIC(3),
post_apd_bspname VARCHAR(40),
post_apd_category VARCHAR(40),
PRIMARY KEY(post_apd_id),
INDEX post_apd_pcode_idx (post_apd_pcode),
INDEX post_apd_locality_idx (post_apd_locality),
INDEX post_apd_state_idx (post_apd_state),
INDEX post_apd_psi_idx (post_apd_psi),
INDEX post_apd_bspnum_idx (post_apd_bspnum)
) TYPE=INNODB;
--
-- Table structure for table 'post_print_plan'
--
CREATE TABLE post_print_plan (
pp_plan_id INTEGER AUTO_INCREMENT NOT NULL,
pp_plan_state CHAR(3) NOT NULL,
pp_plan_psi NUMERIC(3) NOT NULL,
pp_plan_type_code CHAR(1) NOT NULL,
pp_plan_desc VARCHAR(50),
PRIMARY KEY(pp_plan_id),
INDEX pp_plan_state_idx (pp_plan_state),
INDEX pp_plan_psi_idx (pp_plan_psi),
INDEX pp_plan_type_code_idx (pp_plan_type_code),
FOREIGN KEY (pp_plan_state) REFERENCES post_print_states (pp_state_code),
FOREIGN KEY (pp_plan_type_code) REFERENCES post_print_types (pp_type_code)
) TYPE=INNODB;
--
-- Table structure for table 'post_print_presort'
--
CREATE TABLE post_print_presort (
pp_presort_id INTEGER AUTO_INCREMENT NOT NULL,
pp_presort_psi NUMERIC(3) NOT NULL,
pp_presort_pcode NUMERIC(4) NOT NULL,
PRIMARY KEY(pp_presort_id),
INDEX pp_presort_psi_idx (pp_presort_psi),
INDEX pp_presort_pcode_idx (pp_presort_pcode),
FOREIGN KEY (pp_presort_psi) REFERENCES post_print_plan (pp_plan_psi)
) TYPE=INNODB;