Skip to content

Instantly share code, notes, and snippets.

@nmenda
Created February 3, 2014 19:58
Show Gist options
  • Save nmenda/8791222 to your computer and use it in GitHub Desktop.
Save nmenda/8791222 to your computer and use it in GitHub Desktop.
-- ================================================
-- TABLE: genotypeprop
-- ================================================
create table genotypeprop (
genotypeprop_id serial not null,
primary key (genotypeprop_id),
genotype_id int not null,
foreign key (genotype_id) references genotype (genotype_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 genotypeprop_c1 unique (genotype_id,type_id,rank)
);
create index genotypeprop_idx1 on genotypeprop (genotype_id);
create index genotypeprop_idx2 on genotypeprop (type_id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment