File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-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+
13+ -- -- remove the old primary key on the serial id and make a pkey on the text
14+ -- ALTER TABLE header_variantfile_association DROP CONSTRAINT header_variantfile_association_header_id_fkey;
15+ -- ALTER TABLE header DROP CONSTRAINT header_pkey;
16+ -- ALTER TABLE header ADD CONSTRAINT text_unique UNIQUE (text);
17+ -- ALTER TABLE header ADD CONSTRAINT header_pkey PRIMARY KEY (text);
18+ -- ALTER TABLE header_variantfile_association ADD CONSTRAINT header_variantfile_association_header_id_fkey FOREIGN KEY (header_id) REFERENCES header (id);
19+ END;
20+ $$;
You can’t perform that action at this time.
0 commit comments