Skip to content

Commit

Permalink
fix update database
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinDo committed Feb 21, 2024
1 parent 7d94df8 commit 49ba77d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions resources/backups/database_dumper/update_database_5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ALTER TABLE `HerediVar`.`variant_heredicare_annotation`
CHANGE COLUMN `lr_family` `lr_family` FLOAT NULL DEFAULT NULL ;


UPDATE `HerediVar`.`annotation_type` SET is_deleted=1 WHERE title="arup_classification"
UPDATE `HerediVar`.`annotation_type` SET is_deleted=1 WHERE title="arup_classification";



Expand Down Expand Up @@ -108,15 +108,15 @@ ALTER TABLE `HerediVar`.`assay_metadata_type`
CHANGE COLUMN `value_type` `value_type` TEXT NOT NULL ;


INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('patient_rna', 'Patient RNA', (SELECT id FROM assay_type WHERE title='splicing'), 'bool')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('minigene', 'Minigene', (SELECT id FROM assay_type WHERE title='splicing'), 'bool')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('allele_specific', 'Allele-Specific', (SELECT id FROM assay_type WHERE title='splicing'), 'ENUM:True,False,Construct')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('comment', 'Comment', (SELECT id FROM assay_type WHERE title='splicing'), 'text')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('score', 'Score', (SELECT id FROM assay_type WHERE title='splicing'), 'float')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('minimal_percentage', 'Percent aberrant transcript', (SELECT id FROM assay_type WHERE title='splicing'), 'float')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('patient_rna', 'Patient RNA', (SELECT id FROM assay_type WHERE title='splicing'), 'bool');
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('minigene', 'Minigene', (SELECT id FROM assay_type WHERE title='splicing'), 'bool');
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('allele_specific', 'Allele-Specific', (SELECT id FROM assay_type WHERE title='splicing'), 'ENUM:True,False,Construct');
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('comment', 'Comment', (SELECT id FROM assay_type WHERE title='splicing'), 'text');
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('score', 'Score', (SELECT id FROM assay_type WHERE title='splicing'), 'float');
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('minimal_percentage', 'Percent aberrant transcript', (SELECT id FROM assay_type WHERE title='splicing'), 'float');

INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('functional_category', 'Functional category', (SELECT id FROM assay_type WHERE title='functional'), 'ENUM:Pathogenic,Benign,Ambigous')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('score', 'Score', (SELECT id FROM assay_type WHERE title='functional'), 'float')
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('functional_category', 'Functional category', (SELECT id FROM assay_type WHERE title='functional'), 'ENUM:Pathogenic,Benign,Ambigous');
INSERT INTO `HerediVar`.`assay_metadata_type` (title, display_title, assay_type_id, value_type) VALUES ('score', 'Score', (SELECT id FROM assay_type WHERE title='functional'), 'float');


UPDATE `HerediVar`.`assay_metadata_type` SET `is_required` = '0' WHERE (`title` = 'comment');
Expand All @@ -127,8 +127,8 @@ UPDATE `HerediVar`.`assay_metadata_type` SET `is_required` = '0' WHERE (`title`
ALTER TABLE `HerediVar`.`assay`
ADD COLUMN `assay_type_id` INT UNSIGNED NOT NULL AFTER `assay_type`;

UPDATE assay SET assay_type_id = (SELECT id FROM assay_type WHERE title = 'functional') WHERE assay_type = 'functional'
UPDATE assay SET assay_type_id = (SELECT id FROM assay_type WHERE title = 'splicing') WHERE assay_type = 'splicing'
UPDATE assay SET assay_type_id = (SELECT id FROM assay_type WHERE title = 'functional') WHERE assay_type = 'functional';
UPDATE assay SET assay_type_id = (SELECT id FROM assay_type WHERE title = 'splicing') WHERE assay_type = 'splicing';

ALTER TABLE `HerediVar`.`assay`
DROP COLUMN `assay_type`;
Expand Down

0 comments on commit 49ba77d

Please sign in to comment.