Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Postgres + make scripts more consistent #53

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
303 changes: 0 additions & 303 deletions schemas/structure.sql

This file was deleted.

33 changes: 33 additions & 0 deletions schemas/structure_constraints_only.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ALTER TABLE unipept.taxons
ADD PRIMARY KEY (id);
ALTER TABLE unipept.uniprot_entries
ADD PRIMARY KEY (id);
ALTER TABLE unipept.ec_numbers
ADD PRIMARY KEY (id);
ALTER TABLE unipept.go_terms
ADD PRIMARY KEY (id);
ALTER TABLE unipept.interpro_entries
ADD PRIMARY KEY (id);
ALTER TABLE unipept.lineages
ADD PRIMARY KEY (taxon_id);
ALTER TABLE unipept.sequences
ADD PRIMARY KEY (id);
ALTER TABLE unipept.peptides
ADD PRIMARY KEY (id);
ALTER TABLE unipept.datasets
ADD PRIMARY KEY (id);
ALTER TABLE unipept.dataset_items
ADD PRIMARY KEY (id);
ALTER TABLE unipept.dataset_items
ADD CONSTRAINT fk_dataset_items_datasets
FOREIGN KEY (dataset_id)
REFERENCES unipept.datasets (id)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
ALTER TABLE unipept.go_cross_references
ADD PRIMARY KEY (id);
ALTER TABLE unipept.ec_cross_references
ADD PRIMARY KEY (id);
ALTER TABLE unipept.interpro_cross_references
ADD PRIMARY KEY (id);

Loading
Loading