Skip to content
Snippets Groups Projects
Commit c797f6bc authored by Magali Ruffier's avatar Magali Ruffier
Browse files

set of patches for release 70

patch a is the release patch
patch b updates the mapping_set table to fit the new storing format
now, stores both release versions of seq_region id change to link back to the initial id
parent 42648ff8
No related branches found
No related tags found
No related merge requests found
# patch_69_70_a.sql
#
# Title: Update schema version.
#
# Description:
# Update schema_version in meta table to 70.
UPDATE meta SET meta_value='70' WHERE meta_key='schema_version';
# Patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_69_70_a.sql|schema_version');
# patch_69_70_b.sql
#
# Title: Update mapping_set to store history over several releases
#
# Description:
# Updating schema_build row to current_schema_build
# Add new row old_schema_build
# Remove row schema_build, to be replaced by current_schema_build
# All previously stored data will be deleted
ALTER TABLE mapping_set DROP COLUMN schema_build;
ALTER TABLE mapping_set ADD COLUMN (internal_schema_build VARCHAR(20) NOT NULL);
ALTER TABLE mapping_set ADD COLUMN (external_schema_build VARCHAR(20) NOT NULL);
ALTER TABLE mapping_set ADD UNIQUE KEY mapping_idx (internal_schema_build, external_schema_build);
TRUNCATE TABLE seq_region_mapping;
TRUNCATE TABLE mapping_set;
# Patch identifier
INSERT INTO meta (species_id, meta_key, meta_value)
VALUES (NULL, 'patch', 'patch_69_70_b.sql|add_mapping_set_history');
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