diff --git a/misc-scripts/ontology/sql/patch_86_87_a.sql b/misc-scripts/ontology/sql/patch_86_87_a.sql new file mode 100644 index 0000000000000000000000000000000000000000..9f6d2c265a8f368c7ecaa5fffe569a960fd6a220 --- /dev/null +++ b/misc-scripts/ontology/sql/patch_86_87_a.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_86_87_a.sql +# +# Title: Update schema version. +# +# Description: +# Update schema_version in meta table to 87. + +UPDATE meta SET meta_value='87' WHERE meta_key='schema_version'; + +# Patch identifier +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_86_87_a.sql|schema_version'); diff --git a/misc-scripts/ontology/sql/tables.sql b/misc-scripts/ontology/sql/tables.sql index bfbc6723b418a2678c412a259ea118e16b9a8fe8..67b21f5ed229c4026343f38bf0c818a0972ca88d 100644 --- a/misc-scripts/ontology/sql/tables.sql +++ b/misc-scripts/ontology/sql/tables.sql @@ -31,11 +31,11 @@ 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', '86'); + ('schema_version', '87'); # Patches included in this schema file INSERT INTO meta (meta_key, meta_value) - VALUES ('patch', 'patch_85_86_a.sql|schema_version'); + VALUES ('patch', 'patch_86_87_a.sql|schema_version'); CREATE TABLE ontology ( diff --git a/modules/Bio/EnsEMBL/ApiVersion.pm b/modules/Bio/EnsEMBL/ApiVersion.pm index 813711d81797738a9fec7c19e990097f316a2f8f..adfe24c6669ac3c922795d588904792b64ed75f2 100644 --- a/modules/Bio/EnsEMBL/ApiVersion.pm +++ b/modules/Bio/EnsEMBL/ApiVersion.pm @@ -56,7 +56,7 @@ use base qw( Exporter ); our @EXPORT = qw( software_version ); -my $API_VERSION = 86; +my $API_VERSION = 87; sub software_version { return $API_VERSION } diff --git a/modules/t/test-genome-DBs/circ/core/SQLite/table.sql b/modules/t/test-genome-DBs/circ/core/SQLite/table.sql index ab2b0a99207e0e07efa3e5767c027a5474da0322..29a0de9ff73b814cebadc6b2f64eeec5fab52da3 100644 --- a/modules/t/test-genome-DBs/circ/core/SQLite/table.sql +++ b/modules/t/test-genome-DBs/circ/core/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri Jun 24 15:49:02 2016 +-- Created on Wed Oct 5 10:41:42 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -284,8 +284,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -344,8 +344,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -382,7 +382,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -462,7 +462,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -631,8 +631,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -649,8 +649,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -872,8 +872,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -923,8 +923,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/circ/core/meta.txt b/modules/t/test-genome-DBs/circ/core/meta.txt index 75fdfdba825e07d99af9db5dbd4e8d7b3a5319c9..68be203f74221862b3d9ac7a50e5f5db9f683210 100644 --- a/modules/t/test-genome-DBs/circ/core/meta.txt +++ b/modules/t/test-genome-DBs/circ/core/meta.txt @@ -39,7 +39,7 @@ 95 \N patch patch_83_84_c.sql|protein_feature_unique 96 \N patch patch_83_84_d.sql|longer_synonym 1 \N schema_type core -2 \N schema_version 86 +2 \N schema_version 87 8 1 assembly.accession GCA_000292705.1 10 1 assembly.date 2012-08 7 1 assembly.default GCA_000292705.1 @@ -100,3 +100,6 @@ 100 \N patch patch_85_86_a.sql|schema_version 101 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 102 \N patch patch_85_86_c.sql|meta_case_insensitive +103 \N patch patch_86_87_a.sql|schema_version +104 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +105 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/circ/core/table.sql b/modules/t/test-genome-DBs/circ/core/table.sql index 3c20a551c19ecbf729171f918698cfa8b6fd7b10..b32b9568044e1ea595009873f03780d19ebebbd3 100644 --- a/modules/t/test-genome-DBs/circ/core/table.sql +++ b/modules/t/test-genome-DBs/circ/core/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -247,8 +247,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -301,8 +301,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -342,7 +342,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -409,7 +409,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -477,7 +477,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=102 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=106 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -555,8 +555,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -574,8 +574,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -790,8 +790,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -837,8 +837,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql b/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql index 97cb0886706ed3df06ced988027764949e327395..7e4a26e9c91f994161b9b02cde76f69d0975ea42 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql +++ b/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri Jun 24 15:49:07 2016 +-- Created on Wed Oct 5 10:41:53 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -284,8 +284,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -344,8 +344,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -382,7 +382,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -462,7 +462,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -631,8 +631,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -649,8 +649,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -872,8 +872,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -923,8 +923,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt b/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt index 1239bcf547faffbfd51947ebd28874c21ddcee59..cea62dc4b7496e3a87f4011405373c1a92a5c168 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt +++ b/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt @@ -1,4 +1,4 @@ -1 \N schema_version 86 +1 \N schema_version 87 2 1 assembly.default NCBI34 3 1 species.taxonomy_id 9606 26 1 species.classification Homo sapiens @@ -79,3 +79,6 @@ 146 \N patch patch_85_86_a.sql|schema_version 147 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 148 \N patch patch_85_86_c.sql|meta_case_insensitive +149 \N patch patch_86_87_a.sql|schema_version +150 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +151 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/homo_sapiens/core/table.sql b/modules/t/test-genome-DBs/homo_sapiens/core/table.sql index b7cf4c4cc602c11a08f8d2a0dc50aa2b174b88ef..47a66a49979a72fce241e35f211cc749fc7581e2 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/core/table.sql +++ b/modules/t/test-genome-DBs/homo_sapiens/core/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -247,8 +247,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -301,8 +301,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -342,7 +342,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -409,7 +409,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -477,7 +477,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=148 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=152 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -555,8 +555,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -574,8 +574,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -790,8 +790,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -837,8 +837,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql b/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql index 7e95557a954920a4eac41769ea9e11afb83309e8..01133776cbd6c5d0754b3294abed793beb1633a5 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql +++ b/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri Jun 24 15:49:12 2016 +-- Created on Wed Oct 5 10:42:02 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -284,8 +284,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -344,8 +344,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -382,7 +382,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -462,7 +462,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -631,8 +631,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -649,8 +649,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -872,8 +872,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -923,8 +923,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt b/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt index d78d63cb162f549c64bf663e97d1141b4616e403..8137011dacff92a60dfb3570f6316b805339c7f0 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt +++ b/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt @@ -1,4 +1,4 @@ -1 \N schema_version 86 +1 \N schema_version 87 2 1 assembly.default NCBI34 33 1 species.classification Chordata 32 1 species.classification Vertebrata @@ -79,3 +79,6 @@ 128 \N patch patch_85_86_a.sql|schema_version 129 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 130 \N patch patch_85_86_c.sql|meta_case_insensitive +131 \N patch patch_86_87_a.sql|schema_version +132 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +133 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql b/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql index f130e0ab18a59afc83abe3297f3bff6510253ec9..7379e04887f553bf2e8da9f24b4de86e6ddfecb3 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql +++ b/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -247,8 +247,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -301,8 +301,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -342,7 +342,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -409,7 +409,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -477,7 +477,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=130 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=134 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -555,8 +555,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -574,8 +574,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -790,8 +790,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -837,8 +837,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql b/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql index 69e4bc42417516085b422b25250645422b225d0d..1f4f93cb1b3b90865955ce17262be98082d9b973 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql +++ b/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Tue May 10 12:29:49 2016 +-- Created on Wed Oct 5 10:42:11 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -284,8 +284,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -344,8 +344,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -382,7 +382,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -462,7 +462,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -631,8 +631,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -649,8 +649,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -872,8 +872,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -923,8 +923,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt b/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt index 0dc79836e013c129d8fa41cd20be40103b725c11..734979c146bbdf2a20a44e03647908d90cc1acc2 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt +++ b/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt @@ -1,4 +1,4 @@ -1 \N schema_version 86 +1 \N schema_version 87 2014 1 species.classification Haplorrhini 40 1 assembly.default GRCh37 41 1 assembly.date 2009-02 @@ -84,3 +84,6 @@ 2091 \N patch patch_85_86_a.sql|schema_version 2092 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 2093 \N patch patch_85_86_c.sql|meta_case_insensitive +2094 \N patch patch_86_87_a.sql|schema_version +2095 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +2096 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql b/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql index 3c70f4b4a35d8f8ae8d822503aa4d0029411c3ac..1251114f4201a84c8a7960814fb10e49f1472c9f 100644 --- a/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql +++ b/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -247,8 +247,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -301,8 +301,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -342,7 +342,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM AUTO_INCREMENT=71 DEFAULT CHARSET=latin1; @@ -409,7 +409,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM AUTO_INCREMENT=394 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -477,7 +477,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=2093 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=2097 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -555,8 +555,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -574,8 +574,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -790,8 +790,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -837,8 +837,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql b/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql index 1f1ff9e260387233d7fb41387443402d172379d1..037709411e6f3d9629b8f0b2cd40903f40d9f24b 100644 --- a/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql +++ b/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri Sep 16 10:11:53 2016 +-- Created on Wed Oct 5 10:42:20 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -284,8 +284,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -344,8 +344,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -382,7 +382,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -462,7 +462,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -631,8 +631,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -649,8 +649,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -872,8 +872,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -923,8 +923,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/mapping/core/meta.txt b/modules/t/test-genome-DBs/mapping/core/meta.txt index 39c500efb466c58ae8f9886e520ec0902af8fa84..7cc2b0d0703225957fc5e4ca19337f36432f43d6 100644 --- a/modules/t/test-genome-DBs/mapping/core/meta.txt +++ b/modules/t/test-genome-DBs/mapping/core/meta.txt @@ -1,4 +1,4 @@ -1 \N schema_version 86 +1 \N schema_version 87 2 1 assembly.default MULTIMAP 3 1 species.taxonomy_id 1 4 1 assembly.mapping chromosome:MULTIMAP#contig @@ -40,3 +40,6 @@ 133 \N patch patch_85_86_a.sql|schema_version 134 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 135 \N patch patch_85_86_c.sql|meta_case_insensitive +136 \N patch patch_86_87_a.sql|schema_version +137 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +138 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/mapping/core/table.sql b/modules/t/test-genome-DBs/mapping/core/table.sql index 790c3baca00a66291ffde9fb4da671ef4e572a9d..c3d6db59f8826a1dafc3b5e34d5df957812de7d3 100644 --- a/modules/t/test-genome-DBs/mapping/core/table.sql +++ b/modules/t/test-genome-DBs/mapping/core/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -247,8 +247,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -301,8 +301,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -342,7 +342,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -409,7 +409,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -477,7 +477,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=135 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=139 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -555,8 +555,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -574,8 +574,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -790,8 +790,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -837,8 +837,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql b/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql index b934ad83a3e758355256f8d4198587c883baa963..8263d8ea75b72030f77b2ce9b73caae0287f3932 100644 --- a/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql +++ b/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri Sep 16 10:11:58 2016 +-- Created on Wed Oct 5 10:42:27 2016 -- BEGIN TRANSACTION; diff --git a/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql b/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql index f11f25e8dbc3f186236d3106d431039d6996313d..6aaa23b13e88221dbcec4666f1e568a206c710e2 100644 --- a/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql +++ b/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri Sep 16 10:12:04 2016 +-- Created on Wed Oct 5 10:42:35 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -284,8 +284,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -344,8 +344,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -382,7 +382,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -462,7 +462,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -631,8 +631,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -649,8 +649,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -872,8 +872,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -923,8 +923,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/mus_musculus/core/meta.txt b/modules/t/test-genome-DBs/mus_musculus/core/meta.txt index 0ef7d07bc41dc891504ba253635b127aa284f587..d051b9a16b6560fa35cd5794ecf54ed23b395365 100644 --- a/modules/t/test-genome-DBs/mus_musculus/core/meta.txt +++ b/modules/t/test-genome-DBs/mus_musculus/core/meta.txt @@ -1,5 +1,5 @@ 1 \N schema_type core -2 \N schema_version 86 +2 \N schema_version 87 3 \N patch patch_65_66_a.sql|schema_version 4 \N patch patch_65_66_b.sql|fix_external_db_id 5 \N patch patch_65_66_c.sql|reorder_unmapped_obj_index @@ -157,3 +157,6 @@ 1669 \N patch patch_85_86_a.sql|schema_version 1670 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 1671 \N patch patch_85_86_c.sql|meta_case_insensitive +1672 \N patch patch_86_87_a.sql|schema_version +1673 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +1674 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/mus_musculus/core/table.sql b/modules/t/test-genome-DBs/mus_musculus/core/table.sql index 2b5a5a2656c664b31cf709dc93c235a47290b12d..25aaa512fadffe36b496178347e5fcd74f5041f6 100644 --- a/modules/t/test-genome-DBs/mus_musculus/core/table.sql +++ b/modules/t/test-genome-DBs/mus_musculus/core/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -247,8 +247,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -301,15 +301,15 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), KEY `analysis_idx` (`analysis_id`), KEY `stable_id_idx` (`stable_id`,`version`), KEY `canonical_transcript_id_idx` (`canonical_transcript_id`) -) ENGINE=MyISAM AUTO_INCREMENT=6885 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=18257 DEFAULT CHARSET=latin1; CREATE TABLE `gene_archive` ( `gene_stable_id` varchar(128) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -342,7 +342,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -409,7 +409,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -477,7 +477,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=1671 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=1675 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -555,8 +555,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -574,8 +574,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -708,7 +708,7 @@ CREATE TABLE `seq_region` ( PRIMARY KEY (`seq_region_id`), UNIQUE KEY `name_cs_idx` (`name`,`coord_system_id`), KEY `cs_idx` (`coord_system_id`) -) ENGINE=MyISAM AUTO_INCREMENT=20603 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; +) ENGINE=MyISAM AUTO_INCREMENT=13705556 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; CREATE TABLE `seq_region_attrib` ( `seq_region_id` int(10) unsigned NOT NULL DEFAULT '0', @@ -790,8 +790,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -837,8 +837,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql b/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql index 6969352d60d92350f1100d186d15164e32cf7ce8..d3de76e9a3922485bdce6d348d0ba714e22f3ec7 100644 --- a/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql +++ b/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Tue May 10 12:31:29 2016 +-- Created on Wed Oct 5 10:42:44 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -273,8 +273,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -333,8 +333,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -371,7 +371,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -451,7 +451,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -620,8 +620,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -638,8 +638,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -861,8 +861,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -912,8 +912,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/nameless/core/meta.txt b/modules/t/test-genome-DBs/nameless/core/meta.txt index f29f4211be5a940e1d85abfb523ce51e9cd3be95..13c0f660335d1b4aa20e1e7336e8ec113bae0750 100644 --- a/modules/t/test-genome-DBs/nameless/core/meta.txt +++ b/modules/t/test-genome-DBs/nameless/core/meta.txt @@ -1,4 +1,4 @@ -1 \N schema_version 86 +1 \N schema_version 87 2 1 assembly.default NCBI34 3 1 species.taxonomy_id 9606 26 1 species.classification Homo sapiens @@ -78,3 +78,6 @@ 132 \N patch patch_85_86_a.sql|schema_version 133 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 134 \N patch patch_85_86_c.sql|meta_case_insensitive +135 \N patch patch_86_87_a.sql|schema_version +136 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +137 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/nameless/core/table.sql b/modules/t/test-genome-DBs/nameless/core/table.sql index 9d726286678d89d780a1c53bc3d5eee818c635e0..f282d1454e3c12172fb31a6688f1ad2c9190e43f 100644 --- a/modules/t/test-genome-DBs/nameless/core/table.sql +++ b/modules/t/test-genome-DBs/nameless/core/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -237,8 +237,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -291,8 +291,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -332,7 +332,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -399,7 +399,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -467,7 +467,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=133 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=138 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -545,8 +545,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -564,8 +564,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -780,8 +780,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -827,8 +827,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql b/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql index 543ab7579eb8da1f2adb183e6b4babc2f62fd334..7d6ae6d73dd1bbd2407f47b920fe4e3e3c6e7c45 100644 --- a/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql +++ b/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri May 6 15:45:55 2016 +-- Created on Wed Oct 5 10:42:47 2016 -- BEGIN TRANSACTION; @@ -226,8 +226,8 @@ CREATE TABLE ontology ( ontology_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name varchar(64) NOT NULL, namespace varchar(64) NOT NULL, - data_version VARCHAR(64) NULL - ); + data_version varchar(64) +); CREATE UNIQUE INDEX name_namespace_idx ON ontology (name, namespace); diff --git a/modules/t/test-genome-DBs/ontology/ontology/meta.txt b/modules/t/test-genome-DBs/ontology/ontology/meta.txt index 675b1c59dffb0018e6420ede80665ac4312e81a6..7161701a28253bbc9b6f6d0cd2425666fd96c4b4 100644 --- a/modules/t/test-genome-DBs/ontology/ontology/meta.txt +++ b/modules/t/test-genome-DBs/ontology/ontology/meta.txt @@ -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 86 \N +15 schema_version 87 \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 @@ -25,3 +25,4 @@ 28 patch patch_84_85_a.sql|schema_version \N 29 patch patch_84_85_d.sql|schema_version \N 30 patch patch_85_86_a.sql|schema_version \N +31 patch patch_86_87_a.sql|schema_version \N diff --git a/modules/t/test-genome-DBs/ontology/ontology/table.sql b/modules/t/test-genome-DBs/ontology/ontology/table.sql index 421e051c4df81be029427784fb3b12b89542c2f6..9ce1f1296a86c95238fa6290f05d6c6a01707693 100644 --- a/modules/t/test-genome-DBs/ontology/ontology/table.sql +++ b/modules/t/test-genome-DBs/ontology/ontology/table.sql @@ -139,7 +139,7 @@ CREATE TABLE `meta` ( `species_id` int(1) unsigned DEFAULT NULL, PRIMARY KEY (`meta_id`), UNIQUE KEY `key_value_idx` (`meta_key`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1; CREATE TABLE `ontology` ( `ontology_id` int(10) unsigned NOT NULL AUTO_INCREMENT, diff --git a/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql b/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql index c0b43a20d0a5373f7adc7d51bc3225789145ed67..2199af3e0c39460ef73b5efe62c2271dc9390131 100644 --- a/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql +++ b/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Fri Sep 16 10:12:18 2016 +-- Created on Wed Oct 5 10:42:56 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -284,8 +284,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -344,8 +344,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -382,7 +382,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -462,7 +462,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -631,8 +631,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -649,8 +649,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -872,8 +872,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -923,8 +923,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/polyploidy/core/meta.txt b/modules/t/test-genome-DBs/polyploidy/core/meta.txt index 737c56a316bbc04182ef8f258276391845eddfa0..637d6b64df4b43141334b16eca800d441abcba40 100644 --- a/modules/t/test-genome-DBs/polyploidy/core/meta.txt +++ b/modules/t/test-genome-DBs/polyploidy/core/meta.txt @@ -1,5 +1,5 @@ 1 \N schema_type core -2 \N schema_version 86 +2 \N schema_version 87 3 \N patch patch_68_69_a.sql|schema_version 4 1 species.taxonomy_id 4565 6 1 species.alias bread wheat @@ -133,3 +133,6 @@ 213 \N patch patch_85_86_a.sql|schema_version 214 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 215 \N patch patch_85_86_c.sql|meta_case_insensitive +216 \N patch patch_86_87_a.sql|schema_version +217 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +218 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/polyploidy/core/table.sql b/modules/t/test-genome-DBs/polyploidy/core/table.sql index e71db8b23049775f69fbea49a37072c3304dacfc..e74a5ef25dd5d8a62b0e00e23de16eb2da7cc3a7 100644 --- a/modules/t/test-genome-DBs/polyploidy/core/table.sql +++ b/modules/t/test-genome-DBs/polyploidy/core/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -247,8 +247,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -301,8 +301,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -342,7 +342,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM AUTO_INCREMENT=45 DEFAULT CHARSET=latin1; @@ -409,7 +409,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -477,7 +477,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=215 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=219 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -555,8 +555,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -574,8 +574,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -790,8 +790,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -837,8 +837,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql b/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql index 60e2148a428e527995f24e7b252a827f4c35a191..4610d36cd210cb566999f7485fa204bc60abd9f6 100644 --- a/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql +++ b/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Tue May 10 12:32:17 2016 +-- Created on Wed Oct 5 10:43:04 2016 -- BEGIN TRANSACTION; @@ -36,7 +36,7 @@ CREATE TABLE alt_allele_group ( -- CREATE TABLE analysis ( analysis_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, - created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + created datetime, logic_name varchar(40) NOT NULL DEFAULT '', db varchar(120), db_version varchar(40), @@ -273,8 +273,8 @@ CREATE TABLE exon ( is_constitutive tinyint NOT NULL DEFAULT 0, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -333,8 +333,8 @@ CREATE TABLE gene ( canonical_transcript_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -371,7 +371,7 @@ CREATE TABLE genome_statistics ( value bigint NOT NULL DEFAULT 0, species_id integer DEFAULT 1, attrib_type_id integer, - timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + timestamp datetime ); CREATE UNIQUE INDEX stats_uniq ON genome_statistics (statistic, attrib_type_id, species_id); @@ -451,7 +451,7 @@ CREATE TABLE mapping_session ( new_release varchar(5) NOT NULL DEFAULT '', old_assembly varchar(20) NOT NULL DEFAULT '', new_assembly varchar(20) NOT NULL DEFAULT '', - created datetime NOT NULL + created datetime ); -- @@ -620,8 +620,8 @@ CREATE TABLE operon ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -638,8 +638,8 @@ CREATE TABLE operon_transcript ( analysis_id smallint NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- @@ -861,8 +861,8 @@ CREATE TABLE transcript ( canonical_translation_id integer, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); CREATE UNIQUE INDEX canonical_translation_idx ON transcript (canonical_translation_id); @@ -912,8 +912,8 @@ CREATE TABLE translation ( end_exon_id integer NOT NULL, stable_id varchar(128), version smallint, - created_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00' + created_date datetime, + modified_date datetime ); -- diff --git a/modules/t/test-genome-DBs/test_collection/core/meta.txt b/modules/t/test-genome-DBs/test_collection/core/meta.txt index 6f2557ef72127efc2e06e8b681a0d19561890ce4..3861a9541318f290c35ea5fc27fa139fca1d0d08 100644 --- a/modules/t/test-genome-DBs/test_collection/core/meta.txt +++ b/modules/t/test-genome-DBs/test_collection/core/meta.txt @@ -39,7 +39,7 @@ 190 \N patch patch_83_84_c.sql|protein_feature_unique 191 \N patch patch_83_84_d.sql|longer_synonym 1 \N schema_type core -2 \N schema_version 86 +2 \N schema_version 87 8 1 assembly.accession GCA_000292705.1 10 1 assembly.date 2012-08 7 1 assembly.default GCA_000292705.1 @@ -153,3 +153,6 @@ 195 \N patch patch_85_86_a.sql|schema_version 196 \N patch patch_85_86_b.sql|add dna_align_feature_attrib table 197 \N patch patch_85_86_c.sql|meta_case_insensitive +198 \N patch patch_86_87_a.sql|schema_version +199 \N patch patch_86_87_b.sql|meta_value_NOT_NULL +200 \N patch patch_86_87_c.sql|datetime_default_NULL diff --git a/modules/t/test-genome-DBs/test_collection/core/table.sql b/modules/t/test-genome-DBs/test_collection/core/table.sql index e4de73f311a34695adf2ee316681e53378143377..b09e5841549f887cd520afc5491b137503df74c2 100644 --- a/modules/t/test-genome-DBs/test_collection/core/table.sql +++ b/modules/t/test-genome-DBs/test_collection/core/table.sql @@ -20,7 +20,7 @@ CREATE TABLE `alt_allele_group` ( CREATE TABLE `analysis` ( `analysis_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime DEFAULT NULL, `logic_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', `db` varchar(120) COLLATE latin1_bin DEFAULT NULL, `db_version` varchar(40) COLLATE latin1_bin DEFAULT NULL, @@ -237,8 +237,8 @@ CREATE TABLE `exon` ( `is_constitutive` tinyint(1) NOT NULL DEFAULT '0', `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`exon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `stable_id_idx` (`stable_id`,`version`) @@ -291,8 +291,8 @@ CREATE TABLE `gene` ( `canonical_transcript_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`gene_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `xref_id_index` (`display_xref_id`), @@ -332,7 +332,7 @@ CREATE TABLE `genome_statistics` ( `value` bigint(11) unsigned NOT NULL DEFAULT '0', `species_id` int(10) unsigned DEFAULT '1', `attrib_type_id` int(10) unsigned DEFAULT NULL, - `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `timestamp` datetime DEFAULT NULL, PRIMARY KEY (`genome_statistics_id`), UNIQUE KEY `stats_uniq` (`statistic`,`attrib_type_id`,`species_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -399,7 +399,7 @@ CREATE TABLE `mapping_session` ( `new_release` varchar(5) COLLATE latin1_bin NOT NULL DEFAULT '', `old_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', `new_assembly` varchar(20) COLLATE latin1_bin NOT NULL DEFAULT '', - `created` datetime NOT NULL, + `created` datetime DEFAULT NULL, PRIMARY KEY (`mapping_session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin; @@ -467,7 +467,7 @@ CREATE TABLE `meta` ( PRIMARY KEY (`meta_id`), UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`), KEY `species_value_idx` (`species_id`,`meta_value`) -) ENGINE=MyISAM AUTO_INCREMENT=196 DEFAULT CHARSET=latin1; +) ENGINE=MyISAM AUTO_INCREMENT=201 DEFAULT CHARSET=latin1; CREATE TABLE `meta_coord` ( `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '', @@ -545,8 +545,8 @@ CREATE TABLE `operon` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), KEY `name_idx` (`display_label`), @@ -564,8 +564,8 @@ CREATE TABLE `operon_transcript` ( `analysis_id` smallint(5) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`operon_transcript_id`), KEY `operon_idx` (`operon_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -780,8 +780,8 @@ CREATE TABLE `transcript` ( `canonical_translation_id` int(10) unsigned DEFAULT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`transcript_id`), UNIQUE KEY `canonical_translation_idx` (`canonical_translation_id`), KEY `seq_region_idx` (`seq_region_id`,`seq_region_start`), @@ -827,8 +827,8 @@ CREATE TABLE `translation` ( `end_exon_id` int(10) unsigned NOT NULL, `stable_id` varchar(128) DEFAULT NULL, `version` smallint(5) unsigned DEFAULT NULL, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime DEFAULT NULL, + `modified_date` datetime DEFAULT NULL, PRIMARY KEY (`translation_id`), KEY `transcript_idx` (`transcript_id`), KEY `stable_id_idx` (`stable_id`,`version`) diff --git a/sql/patch_86_87_a.sql b/sql/patch_86_87_a.sql new file mode 100644 index 0000000000000000000000000000000000000000..5a6e75c958ccd2d46671dbd8aa35b2d448aef492 --- /dev/null +++ b/sql/patch_86_87_a.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_86_87_a.sql +# +# Title: Update schema version. +# +# Description: +# Update schema_version in meta table to 87. + +UPDATE meta SET meta_value='87' WHERE meta_key='schema_version'; + +# Patch identifier +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_86_87_a.sql|schema_version'); diff --git a/sql/patch_86_87_b.sql b/sql/patch_86_87_b.sql new file mode 100644 index 0000000000000000000000000000000000000000..2810c8ee29ed23edf714168464698fbd9a316db0 --- /dev/null +++ b/sql/patch_86_87_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_86_87_b.sql +# +# Title: Meta value NOT NULL +# +# Description: +# Enfored meta_value in meta table to be NOT NULL + +ALTER TABLE meta MODIFY COLUMN meta_value VARCHAR(255) NOT NULL; + +# Patch identifier +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_86_87_b.sql|meta_value_NOT_NULL'); diff --git a/sql/patch_86_87_c.sql b/sql/patch_86_87_c.sql new file mode 100644 index 0000000000000000000000000000000000000000..b5f936bb9cc045aca56a4e16dccee39afb7079ba --- /dev/null +++ b/sql/patch_86_87_c.sql @@ -0,0 +1,41 @@ +-- 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_86_87_c.sql +# +# Title: DATETIME DEFAULT NULL +# +# Description: +# Later MySQLs no longer accept 0 in datetime fields and CURRENT_TIMESTAMP was introduced for dynamic default value. +# Older MySQLs do not support CURRENT_TIMESTAMP. To be able to support both, DATETIME DEFAULT is set to NULL + +ALTER TABLE genome_statistics MODIFY COLUMN timestamp DATETIME NULL DEFAULT NULL; +ALTER TABLE analysis MODIFY COLUMN created DATETIME NULL DEFAULT NULL; +ALTER TABLE exon MODIFY COLUMN created_date DATETIME NULL DEFAULT NULL; +ALTER TABLE exon MODIFY COLUMN modified_date DATETIME NULL DEFAULT NULL; +ALTER TABLE gene MODIFY COLUMN created_date DATETIME NULL DEFAULT NULL; +ALTER TABLE gene MODIFY COLUMN modified_date DATETIME NULL DEFAULT NULL; +ALTER TABLE transcript MODIFY COLUMN created_date DATETIME NULL DEFAULT NULL; +ALTER TABLE transcript MODIFY COLUMN modified_date DATETIME NULL DEFAULT NULL; +ALTER TABLE translation MODIFY COLUMN created_date DATETIME NULL DEFAULT NULL; +ALTER TABLE translation MODIFY COLUMN modified_date DATETIME NULL DEFAULT NULL; +ALTER TABLE operon MODIFY COLUMN created_date DATETIME NULL DEFAULT NULL; +ALTER TABLE operon MODIFY COLUMN modified_date DATETIME NULL DEFAULT NULL; +ALTER TABLE operon_transcript MODIFY COLUMN created_date DATETIME NULL DEFAULT NULL; +ALTER TABLE operon_transcript MODIFY COLUMN modified_date DATETIME NULL DEFAULT NULL; + +# Patch identifier +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_86_87_c.sql|datetime_default_NULL'); diff --git a/sql/table.sql b/sql/table.sql index f58f62c593ea6f854a9d00b64f24b8e72597257a..6ca26a9957602d008b07508e80e32a5e93399f3a 100755 --- a/sql/table.sql +++ b/sql/table.sql @@ -225,7 +225,7 @@ CREATE TABLE genome_statistics( value BIGINT(11) UNSIGNED DEFAULT '0' NOT NULL, species_id INT UNSIGNED DEFAULT 1, attrib_type_id INT(10) UNSIGNED DEFAULT NULL, - timestamp DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + timestamp DATETIME DEFAULT NULL, PRIMARY KEY (genome_statistics_id), UNIQUE KEY stats_uniq(statistic, attrib_type_id, species_id) @@ -290,7 +290,7 @@ CREATE TABLE IF NOT EXISTS meta ( meta_id INT NOT NULL AUTO_INCREMENT, species_id INT UNSIGNED DEFAULT 1, meta_key VARCHAR(40) NOT NULL, - meta_value VARCHAR(255), + meta_value VARCHAR(255) NOT NULL, PRIMARY KEY (meta_id), UNIQUE KEY species_key_value_idx (species_id, meta_key, meta_value), @@ -302,20 +302,19 @@ CREATE TABLE IF NOT EXISTS meta ( # Add schema type and schema version to the meta table. INSERT INTO meta (species_id, meta_key, meta_value) VALUES (NULL, 'schema_type', 'core'), - (NULL, 'schema_version', '86'); + (NULL, 'schema_version', '87'); # Patches included in this schema file: # NOTE: At start of release cycle, remove patch entries from last release. # NOTE: Avoid line-breaks in values. INSERT INTO meta (species_id, meta_key, meta_value) - VALUES (NULL, 'patch', 'patch_85_86_a.sql|schema_version'); + VALUES (NULL, 'patch', 'patch_86_87_a.sql|schema_version'); INSERT INTO meta (species_id, meta_key, meta_value) - VALUES (NULL, 'patch', 'patch_85_86_b.sql|add dna_align_feature_attrib table'); + VALUES (NULL, 'patch', 'patch_86_87_b.sql|meta_value_NOT_NULL'); INSERT INTO meta (species_id, meta_key, meta_value) - VALUES (NULL, 'patch', 'patch_85_86_c.sql|meta_case_insensitive'); - + VALUES (NULL, 'patch', 'patch_86_87_c.sql|datetime_default_NULL'); /** @table meta_coord @@ -528,7 +527,7 @@ The module column tells the pipeline which Perl module does the whole analysis, CREATE TABLE IF NOT EXISTS analysis ( analysis_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, - created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, + created datetime DEFAULT NULL, logic_name VARCHAR(128) NOT NULL, db VARCHAR(120), db_version VARCHAR(40), @@ -725,8 +724,8 @@ CREATE TABLE exon ( stable_id VARCHAR(128) DEFAULT NULL, version SMALLINT UNSIGNED DEFAULT NULL, - created_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + created_date DATETIME DEFAULT NULL, + modified_date DATETIME DEFAULT NULL, PRIMARY KEY (exon_id), KEY seq_region_idx (seq_region_id, seq_region_start), @@ -806,8 +805,8 @@ CREATE TABLE gene ( canonical_transcript_id INT(10) UNSIGNED NOT NULL, stable_id VARCHAR(128) DEFAULT NULL, version SMALLINT UNSIGNED DEFAULT NULL, - created_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + created_date DATETIME DEFAULT NULL, + modified_date DATETIME DEFAULT NULL, PRIMARY KEY (gene_id), KEY seq_region_idx (seq_region_id, seq_region_start), @@ -1018,8 +1017,8 @@ CREATE TABLE transcript ( canonical_translation_id INT(10) UNSIGNED, stable_id VARCHAR(128) DEFAULT NULL, version SMALLINT UNSIGNED DEFAULT NULL, - created_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + created_date DATETIME DEFAULT NULL, + modified_date DATETIME DEFAULT NULL, PRIMARY KEY (transcript_id), KEY seq_region_idx (seq_region_id, seq_region_start), @@ -1110,8 +1109,8 @@ CREATE TABLE translation ( end_exon_id INT(10) UNSIGNED NOT NULL, stable_id VARCHAR(128) DEFAULT NULL, version SMALLINT UNSIGNED DEFAULT NULL, - created_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + created_date DATETIME DEFAULT NULL, + modified_date DATETIME DEFAULT NULL, PRIMARY KEY (translation_id), KEY transcript_idx (transcript_id), @@ -2425,8 +2424,8 @@ CREATE TABLE operon ( analysis_id SMALLINT UNSIGNED NOT NULL, stable_id VARCHAR(128) DEFAULT NULL, version SMALLINT UNSIGNED DEFAULT NULL, - created_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + created_date DATETIME DEFAULT NULL, + modified_date DATETIME DEFAULT NULL, PRIMARY KEY (operon_id), KEY seq_region_idx (seq_region_id, seq_region_start), @@ -2469,8 +2468,8 @@ CREATE TABLE operon_transcript ( analysis_id SMALLINT UNSIGNED NOT NULL, stable_id VARCHAR(128) DEFAULT NULL, version SMALLINT UNSIGNED DEFAULT NULL, - created_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', - modified_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + created_date DATETIME DEFAULT NULL, + modified_date DATETIME DEFAULT NULL, PRIMARY KEY (operon_transcript_id), KEY operon_idx (operon_id),