포럼: English (Thread #33281)

mysql generate DDL error (2012-12-21 12:47 by Devin #66707)

my Amateras ERD version is 1.09, mysql is 5

generate DDL is


CREATE TABLE flow_tp_conf_rela(
id INT(12) NOT NULL AUTO_INCREMENT ,
src_comp_id INT(12) NOT NULL ,
child_comp_id INT(12) NOT NULL
) ;

ALTER TABLE flow_tp_conf_rela ADD CONSTRAINT IDX_flow_tp_conf_rela_PK PRIMARY KEY (id);
ALTER TABLE flow_tp_conf_rela ADD CONSTRAINT IDX_flow_tp_conf_rela_FK0 FOREIGN KEY (src_comp_id) REFERENCES flow_tp_conf_detail (id);
ALTER TABLE flow_tp_conf_rela ADD CONSTRAINT IDX_flow_tp_conf_rela_FK1 FOREIGN KEY (child_comp_id) REFERENCES flow_tp_conf_detail (id);

run it display:

SQL error [1075] [42000]: Incorrect table definition; there can be only one auto column and it must be defined as a key
Incorrect table definition; there can be only one auto column and it must be defined as a key

Reply to #66707×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login