 # change the transcript_variation & variation_feature tables to add new consequence protein_altering_variant
 ##################
 
+## VARIATION_FEATURE
+# create tmp table
+CREATE TABLE tmp_vf LIKE variation_feature;
 
-ALTER TABLE variation_feature MODIFY consequence_types SET (
+# alter its consequence type field
+ALTER TABLE tmp_vf CHANGE consequence_types consequence_types SET (
         'intergenic_variant',
         'splice_acceptor_variant',
         'splice_donor_variant',

                                            'protein_altering_variant'
                                        );


# patch identifier
INSERT INTO meta (species_id, meta_key, meta_value) VALUES (NULL,'patch', 'patch_79_80_c.sql|change the column consequence_types in transcript_variation and variation_feature to add protein_altering_variant and change initiator_codon_variant to start_lost');

        'protein_altering_variant'
    ) DEFAULT 'intergenic_variant' NOT NULL;

# insert into tmp table, replacing old terms with new as we go
INSERT INTO tmp_vf SELECT variation_feature_id, seq_region_id, seq_region_start, seq_region_end, seq_region_strand, variation_id, allele_string, variation_name, map_weight, flags, source_id, validation_status,
    REPLACE(consequence_types, 'initiator_codon_variant', 'start_lost'),
variation_set_id, class_attrib_id, somatic, minor_allele, minor_allele_freq, minor_allele_count, alignment_quality, evidence_attribs, clinical_significance, display
FROM variation_feature;

DROP TABLE variation_feature;
RENAME TABLE tmp_vf TO variation_feature;


## TRANSCRIPT VARIATION
# create tmp table
CREATE TABLE tmp_tv LIKE transcript_variation;

# alter its consequence type field
ALTER TABLE tmp_tv CHANGE consequence_types consequence_types SET (
                                            'splice_acceptor_variant',
                                            'splice_donor_variant',
                                            'stop_lost',
