Skip to content
Snippets Groups Projects
Commit 387d1a95 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

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.
parent b783b1eb
No related branches found
No related tags found
No related merge requests found
# 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');
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment