Commit 9722993e authored by Marc Chakiachvili's avatar Marc Chakiachvili
Browse files

Updated ensembl_ontology schema scripts

parent d1e1375b
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2018] 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_95_96_a.sql
--
-- Title: Update schema version.
--
-- Description:
-- Added fields to Term and Ontology tables
-- Added columns
ALTER TABLE ontology ADD COLUMN `title` varchar(255) NULL;
ALTER TABLE term ADD COLUMN `iri` varchar(1000) NULL;
......@@ -43,7 +43,7 @@ CREATE TABLE ontology (
name VARCHAR(64) NOT NULL,
namespace VARCHAR(64) NOT NULL,
data_version VARCHAR(64) DEFAULT NULL,
`title` varchar(255) NULL,
PRIMARY KEY (ontology_id),
UNIQUE INDEX name_namespace_idx (name, namespace)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
......@@ -66,7 +66,7 @@ CREATE TABLE term (
definition TEXT,
is_root INT NOT NULL DEFAULT 0,
is_obsolete INT NOT NULL DEFAULT 0,
`iri` varchar(1000) NULL,
PRIMARY KEY (term_id),
UNIQUE INDEX accession_idx (accession),
UNIQUE INDEX ontology_acc_idx (ontology_id, accession),
......
......@@ -146,6 +146,7 @@ CREATE TABLE `ontology` (
`name` varchar(64) NOT NULL,
`namespace` varchar(64) NOT NULL,
`data_version` varchar(64) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ontology_id`),
UNIQUE KEY `name_namespace_idx` (`name`,`namespace`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
......@@ -197,6 +198,7 @@ CREATE TABLE `term` (
`definition` text,
`is_root` int(11) DEFAULT NULL,
`is_obsolete` int(11) DEFAULT NULL,
`iri` varchar(1000) DEFAULT NULL,
PRIMARY KEY (`term_id`),
UNIQUE KEY `accession_idx` (`accession`),
UNIQUE KEY `ontology_acc_idx` (`ontology_id`,`accession`),
......
Markdown is supported
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