File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -44,4 +44,5 @@ psql --quiet -h "$db" -U $PGUSER -d genomic -a -f data/pr_315.sql >>setup_out.tx
4444psql --quiet -h " $db " -U $PGUSER -d genomic -a -f data/pr_339.sql >> setup_out.txt
4545psql --quiet -h " $db " -U $PGUSER -d genomic -a -f data/pr_341.sql >> setup_out.txt
4646psql --quiet -h " $db " -U $PGUSER -d genomic -a -f data/pr_352.sql >> setup_out.txt
47+ psql --quiet -h " $db " -U $PGUSER -d genomic -a -f data/pf_374.sql >> setup_out.txt
4748echo " ...done"
Original file line number Diff line number Diff line change 1+ DO
2+ $$
3+ BEGIN
4+ -- remove the old primary key on the serial id and make a composite pkey on
5+ -- contig_id + pos_bucket_id
6+ ALTER TABLE pos_bucket_variantfile_association DROP CONSTRAINT pos_bucket_variantfile_association_pos_bucket_id_fkey;
7+ ALTER TABLE pos_bucket DROP CONSTRAINT pos_bucket_pkey;
8+ ALTER TABLE pos_bucket ADD CONSTRAINT pos_bucket_unique UNIQUE (id);
9+ ALTER TABLE pos_bucket ALTER COLUMN id SET NOT NULL ;
10+ ALTER TABLE pos_bucket ADD CONSTRAINT pos_bucket_pkey PRIMARY KEY (contig_id, pos_bucket_id);
11+ ALTER TABLE pos_bucket_variantfile_association ADD CONSTRAINT pos_bucket_variantfile_association_pos_bucket_id_fkey FOREIGN KEY (pos_bucket_id) REFERENCES pos_bucket (id);
12+ END;
13+ $$;
You can’t perform that action at this time.
0 commit comments