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

remove duplicated key

parent 6e83c433
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_b.sql
#
# Title: Change xref.version default.
#
# Description:
# Remove duplicated keys
ALTER TABLE genome_statistics DROP KEY stats_idx;
ALTER TABLE xref MODIFY COLUMN version VARCHAR(10) DEFAULT NULL ;
# Patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_84_85_b.sql|remove_duplicated_key');
......@@ -227,8 +227,7 @@ CREATE TABLE genome_statistics(
timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (genome_statistics_id),
UNIQUE KEY stats_uniq(statistic, attrib_type_id, species_id),
KEY stats_idx (statistic, attrib_type_id, species_id)
UNIQUE KEY stats_uniq(statistic, attrib_type_id, species_id)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
......@@ -309,6 +308,8 @@ INSERT INTO meta (species_id, meta_key, meta_value) VALUES
# NOTE: Avoid line-breaks in values.
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_84_85_a.sql|schema_version');
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_84_85_b.sql|remove_duplicated_key');
/**
......
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