                          alt_allele_group_id INT UNSIGNED NOT NULL, 
                          gene_id INT UNSIGNED NOT NULL,
                          PRIMARY KEY (alt_allele_id),
-                         KEY (gene_id,group_id)
-                         );
+                         KEY (gene_id,alt_allele_group_id)
+                         ) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
 
 CREATE TABLE alt_allele_attrib (alt_allele_id INT UNSIGNED,
                                 attrib ENUM('IS_REPRESENTATIVE',

    WHERE b.is_ref = 1 AND a.gene_id = b.gene_id AND a.group_id = b.alt_allele_id;

# Clean up remains
DROP TABLE aa_back;


# Patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
  VALUES (NULL, 'patch', 'patch_70_71_b.sql|alt_allele_type');

#              integrate old data into the new tables

# Relocate existing data out of the way
CREATE TABLE aa_bak LIKE alt_allele;
INSERT INTO aa_bak SELECT * FROM alt_allele;

DROP TABLE alt_allele;
