From 50aecca5e7dbe0bfcb3666bea4b50d7f9ee5e98d Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Wed, 20 Jul 2011 13:22:54 +0000
Subject: [PATCH] added is)ref to alt_allele table to say which is the
 reference allele

---
 sql/patch_63_64_c.sql | 18 ++++++++++++++++++
 sql/table.sql         |  1 +
 2 files changed, 19 insertions(+)
 create mode 100644 sql/patch_63_64_c.sql

diff --git a/sql/patch_63_64_c.sql b/sql/patch_63_64_c.sql
new file mode 100644
index 0000000000..37d88f3fcc
--- /dev/null
+++ b/sql/patch_63_64_c.sql
@@ -0,0 +1,18 @@
+# patch_63_64_c.sql
+#
+# Title:
+#   is_ref to alt_allele 
+#
+# Description:
+#    Add is_ref to alt_allele to specify which is the reference al
+
+
+# Add the new column.
+ALTER TABLE alt_allele
+  ADD COLUMN is_ref BOOLEAN NOT NULL DEFAULT 0
+    AFTER gene_id;
+
+# Insert patch identifier.
+INSERT INTO meta (species_id, meta_key, meta_value)
+  VALUES (NULL, 'patch',
+    'patch_63_64_c.sql|is_ref_added_to_alt_allele');
diff --git a/sql/table.sql b/sql/table.sql
index 27678f2d53..23f9dcdc16 100755
--- a/sql/table.sql
+++ b/sql/table.sql
@@ -810,6 +810,7 @@ CREATE TABLE unconventional_transcript_association (
 CREATE TABLE alt_allele (
   alt_allele_id         INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
   gene_id               INT(10) UNSIGNED NOT NULL,
+  is_ref                BOOLEAN NOT NULL DEFAULT 0,
 
   UNIQUE KEY gene_idx (gene_id),
   UNIQUE KEY allele_idx (alt_allele_id, gene_id)
-- 
GitLab