Skip to content
Snippets Groups Projects
Commit 5ad40c1d authored by Magali Ruffier's avatar Magali Ruffier
Browse files

ontology updated for release 85

parent 3c4b3878
No related branches found
No related tags found
No related merge requests found
-- 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');
......@@ -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
......
......@@ -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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment