Commit 6399c37b authored by Magali Ruffier's avatar Magali Ruffier
Browse files

ENSCORESW-2967: update schema to 96

parent e3f8508b
-- 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:
# Update schema_version in meta table to 96.
UPDATE meta SET meta_value='96' WHERE meta_key='schema_version';
# Patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_95_96_a.sql|schema_version');
...@@ -31,11 +31,11 @@ CREATE TABLE meta ( ...@@ -31,11 +31,11 @@ CREATE TABLE meta (
# Add schema type and schema version to the meta table # Add schema type and schema version to the meta table
INSERT INTO meta (meta_key, meta_value) VALUES INSERT INTO meta (meta_key, meta_value) VALUES
('schema_type', 'ontology'), ('schema_type', 'ontology'),
('schema_version', '95'); ('schema_version', '96');
# Patches included in this schema file # Patches included in this schema file
INSERT INTO meta (meta_key, meta_value) INSERT INTO meta (meta_key, meta_value)
VALUES ('patch', 'patch_94_95_a.sql|schema_version'); VALUES ('patch', 'patch_95_96_a.sql|schema_version');
CREATE TABLE ontology ( CREATE TABLE ontology (
......
...@@ -56,7 +56,7 @@ use base qw( Exporter ); ...@@ -56,7 +56,7 @@ use base qw( Exporter );
our @EXPORT = qw( software_version ); our @EXPORT = qw( software_version );
my $API_VERSION = 95; my $API_VERSION = 96;
sub software_version { return $API_VERSION } sub software_version { return $API_VERSION }
......
-- --
-- Created by SQL::Translator::Producer::SQLite -- Created by SQL::Translator::Producer::SQLite
-- Created on Wed Sep 26 16:18:37 2018 -- Created on Thu Dec 6 13:49:32 2018
-- --
BEGIN TRANSACTION; BEGIN TRANSACTION;
...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" ( ...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
"analysis_id" smallint "analysis_id" smallint
); );
CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id"); CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
-- --
-- Table: "ontology_xref" -- Table: "ontology_xref"
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
95 \N patch patch_83_84_c.sql|protein_feature_unique 95 \N patch patch_83_84_c.sql|protein_feature_unique
96 \N patch patch_83_84_d.sql|longer_synonym 96 \N patch patch_83_84_d.sql|longer_synonym
1 \N schema_type core 1 \N schema_type core
2 \N schema_version 95 2 \N schema_version 96
8 1 assembly.accession GCA_000292705.1 8 1 assembly.accession GCA_000292705.1
10 1 assembly.date 2012-08 10 1 assembly.date 2012-08
7 1 assembly.default GCA_000292705.1 7 1 assembly.default GCA_000292705.1
...@@ -124,3 +124,5 @@ ...@@ -124,3 +124,5 @@
124 \N patch patch_93_94_c.sql|default_aln_type 124 \N patch patch_93_94_c.sql|default_aln_type
125 \N patch patch_94_95_a.sql|schema_version 125 \N patch patch_94_95_a.sql|schema_version
126 \N patch patch_94_95_b.sql|vertebrate_division_rename 126 \N patch patch_94_95_b.sql|vertebrate_division_rename
127 \N patch patch_94_95_c.sql|ox_key_update
128 \N patch patch_95_96_a.sql|schema_version
...@@ -489,7 +489,7 @@ CREATE TABLE `meta` ( ...@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`), PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`) KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=127 DEFAULT CHARSET=latin1; ) ENGINE=MyISAM AUTO_INCREMENT=129 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` ( CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` ( ...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
`linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL, `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL, `analysis_id` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`object_xref_id`), PRIMARY KEY (`object_xref_id`),
UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`), UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`), KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
KEY `analysis_idx` (`analysis_id`) KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......
-- --
-- Created by SQL::Translator::Producer::SQLite -- Created by SQL::Translator::Producer::SQLite
-- Created on Wed Sep 26 16:18:44 2018 -- Created on Thu Dec 6 13:49:43 2018
-- --
BEGIN TRANSACTION; BEGIN TRANSACTION;
...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" ( ...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
"analysis_id" smallint "analysis_id" smallint
); );
CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id"); CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
-- --
-- Table: "ontology_xref" -- Table: "ontology_xref"
......
1 \N schema_version 95 1 \N schema_version 96
2 1 assembly.default NCBI34 2 1 assembly.default NCBI34
3 1 species.taxonomy_id 9606 3 1 species.taxonomy_id 9606
26 1 species.classification Homo sapiens 26 1 species.classification Homo sapiens
...@@ -103,3 +103,5 @@ ...@@ -103,3 +103,5 @@
170 \N patch patch_93_94_c.sql|default_aln_type 170 \N patch patch_93_94_c.sql|default_aln_type
171 \N patch patch_94_95_a.sql|schema_version 171 \N patch patch_94_95_a.sql|schema_version
172 \N patch patch_94_95_b.sql|vertebrate_division_rename 172 \N patch patch_94_95_b.sql|vertebrate_division_rename
173 \N patch patch_94_95_c.sql|ox_key_update
174 \N patch patch_95_96_a.sql|schema_version
...@@ -489,7 +489,7 @@ CREATE TABLE `meta` ( ...@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`), PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`) KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=173 DEFAULT CHARSET=latin1; ) ENGINE=MyISAM AUTO_INCREMENT=175 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` ( CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` ( ...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
`linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL, `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL, `analysis_id` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`object_xref_id`), PRIMARY KEY (`object_xref_id`),
UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`), UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`), KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
KEY `analysis_idx` (`analysis_id`) KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=253694 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; ) ENGINE=MyISAM AUTO_INCREMENT=253694 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......
-- --
-- Created by SQL::Translator::Producer::SQLite -- Created by SQL::Translator::Producer::SQLite
-- Created on Wed Sep 26 16:18:52 2018 -- Created on Thu Dec 6 13:49:54 2018
-- --
BEGIN TRANSACTION; BEGIN TRANSACTION;
...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" ( ...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
"analysis_id" smallint "analysis_id" smallint
); );
CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id"); CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
-- --
-- Table: "ontology_xref" -- Table: "ontology_xref"
......
1 \N schema_version 95 1 \N schema_version 96
2 1 assembly.default NCBI34 2 1 assembly.default NCBI34
33 1 species.classification Chordata 33 1 species.classification Chordata
32 1 species.classification Vertebrata 32 1 species.classification Vertebrata
...@@ -103,3 +103,5 @@ ...@@ -103,3 +103,5 @@
152 \N patch patch_93_94_c.sql|default_aln_type 152 \N patch patch_93_94_c.sql|default_aln_type
153 \N patch patch_94_95_a.sql|schema_version 153 \N patch patch_94_95_a.sql|schema_version
154 \N patch patch_94_95_b.sql|vertebrate_division_rename 154 \N patch patch_94_95_b.sql|vertebrate_division_rename
155 \N patch patch_94_95_c.sql|ox_key_update
156 \N patch patch_95_96_a.sql|schema_version
...@@ -489,7 +489,7 @@ CREATE TABLE `meta` ( ...@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`), PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`) KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=155 DEFAULT CHARSET=latin1; ) ENGINE=MyISAM AUTO_INCREMENT=157 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` ( CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` ( ...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
`linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL, `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL, `analysis_id` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`object_xref_id`), PRIMARY KEY (`object_xref_id`),
UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`), UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`), KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
KEY `analysis_idx` (`analysis_id`) KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......
-- --
-- Created by SQL::Translator::Producer::SQLite -- Created by SQL::Translator::Producer::SQLite
-- Created on Wed Sep 26 16:18:59 2018 -- Created on Thu Dec 6 13:50:04 2018
-- --
BEGIN TRANSACTION; BEGIN TRANSACTION;
...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" ( ...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
"analysis_id" smallint "analysis_id" smallint
); );
CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id"); CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
-- --
-- Table: "ontology_xref" -- Table: "ontology_xref"
......
1 \N schema_version 95 1 \N schema_version 96
2014 1 species.classification Haplorrhini 2014 1 species.classification Haplorrhini
40 1 assembly.default GRCh37 40 1 assembly.default GRCh37
41 1 assembly.date 2009-02 41 1 assembly.date 2009-02
...@@ -108,3 +108,5 @@ ...@@ -108,3 +108,5 @@
2115 \N patch patch_93_94_c.sql|default_aln_type 2115 \N patch patch_93_94_c.sql|default_aln_type
2116 \N patch patch_94_95_a.sql|schema_version 2116 \N patch patch_94_95_a.sql|schema_version
2117 \N patch patch_94_95_b.sql|vertebrate_division_rename 2117 \N patch patch_94_95_b.sql|vertebrate_division_rename
2118 \N patch patch_94_95_c.sql|ox_key_update
2119 \N patch patch_95_96_a.sql|schema_version
...@@ -489,7 +489,7 @@ CREATE TABLE `meta` ( ...@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`), PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`) KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=2118 DEFAULT CHARSET=latin1; ) ENGINE=MyISAM AUTO_INCREMENT=2120 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` ( CREATE TABLE `meta_coord` (
`table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` ( ...@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
`linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL, `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
`analysis_id` smallint(5) unsigned DEFAULT NULL, `analysis_id` smallint(5) unsigned DEFAULT NULL,
PRIMARY KEY (`object_xref_id`), PRIMARY KEY (`object_xref_id`),
UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`), UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`), KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
KEY `analysis_idx` (`analysis_id`) KEY `analysis_idx` (`analysis_id`)
) ENGINE=MyISAM AUTO_INCREMENT=17375428 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; ) ENGINE=MyISAM AUTO_INCREMENT=17375428 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
......
1 \N schema_type variation 1 \N schema_type variation
2 \N schema_version 95 2 \N schema_version 96
3 \N patch patch_84_85_a.sql|schema version 3 \N patch patch_84_85_a.sql|schema version
4 \N patch patch_84_85_b.sql|create sample_synonym 4 \N patch patch_84_85_b.sql|create sample_synonym
5 \N patch patch_84_85_c.sql|drop column moltype from variation_synonym 5 \N patch patch_84_85_c.sql|drop column moltype from variation_synonym
...@@ -34,3 +34,4 @@ ...@@ -34,3 +34,4 @@
34 \N patch patch_93_94_a.sql|schema version 34 \N patch patch_93_94_a.sql|schema version
35 \N patch patch_94_95_a.sql|schema version 35 \N patch patch_94_95_a.sql|schema version
36 \N patch patch_94_95_b.sql|create table to store allele synonyms 36 \N patch patch_94_95_b.sql|create table to store allele synonyms
37 \N patch patch_95_96_a.sql|schema_version
...@@ -178,7 +178,7 @@ CREATE TABLE `meta` ( ...@@ -178,7 +178,7 @@ CREATE TABLE `meta` (
PRIMARY KEY (`meta_id`), PRIMARY KEY (`meta_id`),
UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
KEY `species_value_idx` (`species_id`,`meta_value`) KEY `species_value_idx` (`species_id`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=latin1; ) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
CREATE TABLE `meta_coord` ( CREATE TABLE `meta_coord` (
`table_name` varchar(40) NOT NULL, `table_name` varchar(40) NOT NULL,
......
--
-- Created by SQL::Translator::Producer::SQLite
-- Created on Thu Dec 6 13:50:07 2018
--
BEGIN TRANSACTION;
COMMIT;
-- --
-- Created by SQL::Translator::Producer::SQLite -- Created by SQL::Translator::Producer::SQLite
-- Created on Wed Sep 26 16:19:07 2018 -- Created on Thu Dec 6 13:50:17 2018
-- --
BEGIN TRANSACTION; BEGIN TRANSACTION;
...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" ( ...@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
"analysis_id" smallint "analysis_id" smallint
); );
CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id"); CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
-- --
-- Table: "ontology_xref" -- Table: "ontology_xref"
......
1 \N schema_version 95 1 \N schema_version 96
2 1 assembly.default MULTIMAP 2 1 assembly.default MULTIMAP
3 1 species.taxonomy_id 1 3 1 species.taxonomy_id 1
4 1 assembly.mapping chromosome:MULTIMAP#contig 4 1 assembly.mapping chromosome:MULTIMAP#contig
...@@ -64,3 +64,5 @@ ...@@ -64,3 +64,5 @@
157 \N patch patch_93_94_c.sql|default_aln_type 157 \N patch patch_93_94_c.sql|default_aln_type
158 \N patch patch_94_95_a.sql|schema_version 158 \N patch patch_94_95_a.sql|schema_version
159 \N patch patch_94_95_b.sql|vertebrate_division_rename 159 \N patch patch_94_95_b.sql|vertebrate_division_rename
160 \N patch patch_94_95_c.sql|ox_key_update
161 \N patch patch_95_96_a.sql|schema_version
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