From: <em...@us...> - 2013-02-27 19:52:18
|
Revision: 25283 http://gmod.svn.sourceforge.net/gmod/?rev=25283&view=rev Author: emmert Date: 2013-02-27 19:43:09 +0000 (Wed, 27 Feb 2013) Log Message: ----------- Add strain_pub table to module Modified Paths: -------------- schema/trunk/chado/modules/organism/organism.sql Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2013-02-08 21:25:30 UTC (rev 25282) +++ schema/trunk/chado/modules/organism/organism.sql 2013-02-27 19:43:09 UTC (rev 25283) @@ -355,6 +355,23 @@ create index strain_dbxref_idx2 on strain_dbxref (dbxref_id); +-- ================================================ +-- TABLE: strain_pub +-- ================================================ +drop table strain_pub cascade; +create table strain_pub ( + strain_pub_id serial not null, + primary key (strain_pub_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(strain_id,pub_id) +); +create index strain_pub_idx1 on strain_pub (strain_id); +create index strain_pub_idx2 on strain_pub (pub_id); + + -- ================================================ -- TABLE: strain_synonym -- ================================================ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <em...@us...> - 2013-03-01 09:03:10
|
Revision: 25284 http://gmod.svn.sourceforge.net/gmod/?rev=25284&view=rev Author: emmert Date: 2013-02-28 19:43:35 +0000 (Thu, 28 Feb 2013) Log Message: ----------- Add tables to organism module: strain_phenotypeprop and strain_relationship_pub Modified Paths: -------------- schema/trunk/chado/modules/organism/organism.sql Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2013-02-27 19:43:09 UTC (rev 25283) +++ schema/trunk/chado/modules/organism/organism.sql 2013-02-28 19:43:35 UTC (rev 25284) @@ -149,7 +149,7 @@ the default 0 value should be used'; ---================================================ +-- ================================================ -- TABLE: organism_cvtermprop -- ================================================ @@ -232,7 +232,7 @@ COMMENT ON TABLE strain_cvterm IS 'strain to cvterm associations. Examples: GOid'; ---================================================ +-- ================================================ -- TABLE: strain_cvtermprop -- ================================================ @@ -295,6 +295,26 @@ -- ================================================ +-- TABLE: strain_relationship_pub +-- ================================================ + +drop table strain_relationship_pub cascade; +create table strain_relationship_pub ( + strain_relationship_pub_id serial not null, + primary key (strain_relationship_pub_id), + strain_relationship_id int not null, + foreign key (strain_relationship_id) references strain_relationship (strain_relationship_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_relationship_pub_c1 unique (strain_relationship_id,pub_id) +); +create index strain_relationship_pub_idx1 on strain_relationship_pub (strain_relationship_id); +create index strain_relationship_pub_idx2 on strain_relationship_pub (pub_id); + +COMMENT ON TABLE strain_relationship_pub IS 'Provenance. Attach optional evidence to a strain_relationship in the form of a publication.'; + + +-- ================================================ -- TABLE: strainprop -- ================================================ @@ -358,6 +378,7 @@ -- ================================================ -- TABLE: strain_pub -- ================================================ + drop table strain_pub cascade; create table strain_pub ( strain_pub_id serial not null, @@ -462,3 +483,26 @@ create index strain_phenotype_idx2 ON strain_phenotype (phenotype_id); COMMENT on table strain_phenotype IS 'Links phenotype(s) associated with a given strain. Types may be, eg, "selected" or "unassigned".'; + + +-- ================================================ +-- TABLE: strain_phenotypeprop +-- ================================================ + +drop table strain_phenotypeprop cascade; +create table strain_phenotypeprop ( + strain_phenotypeprop_id serial not null, + primary key (strain_phenotypeprop_id), + strain_phenotype_id int not null, + foreign key (strain_phenotype_id) references strain_phenotype (strain_phenotype_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_phenotypeprop_c1 unique (strain_phenotype_id,type_id,rank) +); +create index strain_phenotypeprop_idx1 on strain_phenotypeprop (strain_phenotype_id); +create index strain_phenotypeprop_idx2 on strain_phenotypeprop (type_id); + +COMMENT ON TABLE strain_phenotypeprop IS 'Attributes of a strain_phenotype relationship. Eg, a comment'; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |