From 698b5310030b2e8cfaaa1b0259df23c495f93ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Wed, 1 Sep 2010 15:28:45 +0000 Subject: [PATCH] # patch_59_60_c.sql # # Title: # A patch to fix a couple of inconsistencies in the schema. # # Description: # A couple of fixes to the schema to do with inconsistencies found # during QC. --- sql/patch_59_60_c.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sql/patch_59_60_c.sql diff --git a/sql/patch_59_60_c.sql b/sql/patch_59_60_c.sql new file mode 100644 index 0000000000..9c6a6f3ce5 --- /dev/null +++ b/sql/patch_59_60_c.sql @@ -0,0 +1,22 @@ +# patch_59_60_c.sql +# +# Title: +# A patch to fix a couple of inconsistencies in the schema. +# +# Description: +# A couple of fixes to the schema to do with inconsistencies found +# during QC. + +# Make the the 'seq_region_start' and 'seq_region_end' fields of the +# 'karyotype' table UNSIGNED (like they are everywhere else). +ALTER TABLE karyotype + MODIFY COLUMN seq_region_start INT(10) UNSIGNED NOT NULL, + MODIFY COLUMN seq_region_end INT(10) UNSIGNED NOT NULL; + +# Make 'seq_region.length' UNSIGNED (we do not like negative lengths). +ALTER TABLE seq_region + MODIFY COLUMN length INT(10) UNSIGNED NOT NULL; + +# Insert patch identifier. +INSERT INTO meta (species_id, meta_key, meta_value) + VALUES (NULL, 'patch', 'patch_59_60_c.sql|fix_inconsistencies'); -- GitLab