<commit_before><commit_msg>The gene_archive table holds depricated genes.  The fields translation_stable_id, translation_version, peptide_archive_id ought to be NULL for genes that lack a translation.  This patch fixes these fields to allow for NULLs.<commit_after># patch_54_55_h.sql
#
# title: Change translation-related fields in gene_archive to allow for NULLs.
#
# description:
# The gene_archive table holds depricated genes.  The fields
# translation_stable_id, translation_version, peptide_archive_id ought
# to be NULL for genes that lack a translation.  This patch fixes these
# fields to allow for NULLs.

ALTER TABLE gene_archive
  MODIFY COLUMN translation_stable_id   VARCHAR(128),
  MODIFY COLUMN translation_version     SMALLINT,
  MODIFY COLUMN peptide_archive_id      INT(10) UNSIGNED;

-- Also fixup existing data
UPDATE gene_archive
  SET translation_stable_id = NULL,
      translation_version = NULL,
      peptide_archive_id = NULL
  WHERE translation_stable_id = '';

# patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_54_55_h.sql|gene_archive.allow_for_NULLs');

{'fraction_non_alphanumeric': 0.05716798592788039, 'fraction_numerical': 0.011433597185576077, 'mean_word_length': 5.184782608695652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6399112', 'n_tokens_mistral': 348, 'n_tokens_neox': 329, 'n_words': 115}