From: Vladimir G. <vla...@du...> - 2010-02-02 04:28:13
|
Table stepmatrixelement has an unusual name and definition of its primary key: it appears to have been copied from another table, discretecharstate. (Definitions of both are below.) Is this indeed a cut-and-paste error? --Vladimir CREATE TABLE stepmatrixelement ( discretecharstate_id bigint NOT NULL DEFAULT nextval('discretecharstate_id_sequence'::regclass), "version" integer, transcost double precision, state1_id bigint, state2_id bigint, stepmatrix_id bigint NOT NULL, CONSTRAINT stepmatrixelement_pkey PRIMARY KEY (discretecharstate_id), CONSTRAINT fk891100af6e972a88 FOREIGN KEY (state1_id) REFERENCES discretecharstate (discretecharstate_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk891100af6e979ee7 FOREIGN KEY (state2_id) REFERENCES discretecharstate (discretecharstate_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk891100af9e8198e FOREIGN KEY (stepmatrix_id) REFERENCES usertype (usertype_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) CREATE TABLE discretecharstate ( discretecharstate_id bigint NOT NULL DEFAULT nextval('discretecharstate_id_sequence'::regclass), "version" integer, description character varying(255), notes character varying(255), symbol character(1), phylochar_id bigint NOT NULL, stateset_id bigint, ancestralstate_id bigint, CONSTRAINT discretecharstate_pkey PRIMARY KEY (discretecharstate_id), CONSTRAINT fk2eef2802163c67ce FOREIGN KEY (stateset_id) REFERENCES stateset (stateset_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk2eef2802c7beaafe FOREIGN KEY (ancestralstate_id) REFERENCES ancestralstate (ancestralstate_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT fk2eef2802fe41a723 FOREIGN KEY (phylochar_id) REFERENCES phylochar (phylochar_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) |