diff --git a/sql/patch_87_88.b.sql b/sql/patch_87_88.b.sql new file mode 100644 index 0000000000000000000000000000000000000000..32b212e80279f75f766b4e4da43b6a7d9caefc7b --- /dev/null +++ b/sql/patch_87_88.b.sql @@ -0,0 +1,27 @@ +-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute +-- Copyright [2016] 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_87_88_b.sql +# +# Title: Allow seq_region name to be longer +# +# Description: +# Name in seq_region table will be enlarged to VARCHAR(255) + +ALTER TABLE seq_region MODIFY COLUMN name VARCHAR(255) NOT NULL; + +# Patch identifier +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_87_88_b.sql|seq_region_name_255'); diff --git a/sql/patch_87_88_b.sql b/sql/patch_87_88_b.sql new file mode 100644 index 0000000000000000000000000000000000000000..32b212e80279f75f766b4e4da43b6a7d9caefc7b --- /dev/null +++ b/sql/patch_87_88_b.sql @@ -0,0 +1,27 @@ +-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute +-- Copyright [2016] 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_87_88_b.sql +# +# Title: Allow seq_region name to be longer +# +# Description: +# Name in seq_region table will be enlarged to VARCHAR(255) + +ALTER TABLE seq_region MODIFY COLUMN name VARCHAR(255) NOT NULL; + +# Patch identifier +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_87_88_b.sql|seq_region_name_255'); diff --git a/sql/table.sql b/sql/table.sql index 36cccd19466d45a492b89230cad1c6c986b00bfa..87e390c276c3ff0ffaa63acfe557ba8a2188ee6f 100755 --- a/sql/table.sql +++ b/sql/table.sql @@ -309,6 +309,9 @@ 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_87_88_a.sql|schema_version'); +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_87_88_b.sql|seq_region_name_255'); + /** @table meta_coord @@ -355,7 +358,7 @@ The relationship between contigs and clones is stored in the assembly table. The CREATE TABLE seq_region ( seq_region_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - name VARCHAR(40) NOT NULL, + name VARCHAR(255) NOT NULL, coord_system_id INT(10) UNSIGNED NOT NULL, length INT(10) UNSIGNED NOT NULL,