From 5ad40c1d15721949c54132324cc38aec104c093a Mon Sep 17 00:00:00 2001 From: Magali Ruffier <mr6@ebi.ac.uk> Date: Tue, 10 May 2016 13:16:05 +0100 Subject: [PATCH] ontology updated for release 85 --- misc-scripts/ontology/sql/patch_84_85_a.sql | 26 +++++++++++++++++++ misc-scripts/ontology/sql/tables.sql | 10 +++++-- .../ontology/ontology/meta.txt | 3 ++- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 misc-scripts/ontology/sql/patch_84_85_a.sql diff --git a/misc-scripts/ontology/sql/patch_84_85_a.sql b/misc-scripts/ontology/sql/patch_84_85_a.sql new file mode 100644 index 0000000000..e2ed93c541 --- /dev/null +++ b/misc-scripts/ontology/sql/patch_84_85_a.sql @@ -0,0 +1,26 @@ +-- Copyright [1999-2016] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +# patch_84_85_a.sql +# +# Title: Update schema version. +# +# Description: +# Update schema_version in meta table to 85. + +UPDATE meta SET meta_value='85' WHERE meta_key='schema_version'; + +# Patch identifier +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_84_85_a.sql|schema_version'); diff --git a/misc-scripts/ontology/sql/tables.sql b/misc-scripts/ontology/sql/tables.sql index efa8b35523..82832a92b3 100644 --- a/misc-scripts/ontology/sql/tables.sql +++ b/misc-scripts/ontology/sql/tables.sql @@ -30,11 +30,15 @@ CREATE TABLE meta ( # Add schema type and schema version to the meta table INSERT INTO meta (meta_key, meta_value) VALUES ('schema_type', 'ontology'), - ('schema_version', '84'); + ('schema_version', '85'); # Patches included in this schema file INSERT INTO meta (meta_key, meta_value) - VALUES ('patch', 'patch_83_84_a.sql|schema_version'); + VALUES ('patch', 'patch_84_85_a.sql|schema_version'); +INSERT INTO meta (meta_key, meta_value) + VALUES ('patch', 'patch_84_85_b.sql|confident_relationship'); +INSERT INTO meta (meta_key, meta_value) + VALUES ('patch', 'patch_84_85_c.sql| add synonym dbxref'); CREATE TABLE ontology ( @@ -76,6 +80,7 @@ CREATE TABLE synonym ( term_id INT UNSIGNED NOT NULL, name TEXT NOT NULL, type ENUM('EXACT', 'BROAD', 'NARROW', 'RELATED'), + dbxref VARCHAR(64) NULL, PRIMARY KEY (synonym_id), UNIQUE INDEX term_synonym_idx (term_id, synonym_id), @@ -121,6 +126,7 @@ CREATE TABLE closure ( subparent_term_id INT UNSIGNED, distance TINYINT UNSIGNED NOT NULL, ontology_id INT UNSIGNED NOT NULL, + confident_relationship BOOL NOT NULL, PRIMARY KEY (closure_id), UNIQUE INDEX child_parent_idx diff --git a/modules/t/test-genome-DBs/ontology/ontology/meta.txt b/modules/t/test-genome-DBs/ontology/ontology/meta.txt index 5df37bd58e..e5d025d256 100644 --- a/modules/t/test-genome-DBs/ontology/ontology/meta.txt +++ b/modules/t/test-genome-DBs/ontology/ontology/meta.txt @@ -9,7 +9,7 @@ 10 patch patch_72_73_b.sql|meta \N 12 patch patch_73_74_a.sql|schema_version \N 14 patch patch_74_75_a.sql|schema_version \N -15 schema_version 84 \N +15 schema_version 85 \N 16 patch patch_75_76_a.sql|schema_version \N 17 patch patch_76_77_a.sql|schema_version \N 18 patch patch_77_78_a.sql|schema_version \N @@ -22,3 +22,4 @@ 25 patch patch_83_84_a.sql|schema_version \N 26 patch patch_84_85_b.sql|confident_relationship \N 27 patch patch_84_85_c.sql| add synonym dbxref \N +28 patch patch_84_85_a.sql|schema_version \N -- GitLab