Skip to content

Commit

Permalink
update database update
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinDo committed Feb 21, 2024
1 parent 49ba77d commit 6915c9e
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions resources/backups/database_dumper/update_database_5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,50 @@
-- ADD COLUMN `is_deleted` TINYINT(1) NOT NULL DEFAULT 0 AFTER `is_transcript_specific`;


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


CREATE TABLE `HerediVar`.`variant_cancerhotspots_annotation` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`variant_id` INT UNSIGNED NOT NULL,
`oncotree_symbol` VARCHAR(45) NOT NULL,
`cancertype` TEXT NOT NULL,
`tissue` TEXT NOT NULL,
`occurances` INT NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `id_UNIQUE` (`id` ASC) );


ALTER TABLE `HerediVar`.`variant_cancerhotspots_annotation`
ADD COLUMN `annotation_type_id` INT UNSIGNED NOT NULL AFTER `occurances`;


INSERT INTO `HerediVar`.`annotation_type` (`title`, `display_title`, `description`, `value_type`, `version`, `version_date`, `group_name`, `is_transcript_specific`, `is_deleted`) VALUES ('cancerhotspots', 'cancerhotspots', 'The oncotree symbol, cancertype, tissue and number of occurances form the cancerhotspots database', 'text', 'v2', '2017-12-15', 'None', '0', '0');


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

GRANT SELECT, INSERT, UPDATE, DELETE ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_annotation';
GRANT SELECT ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_user';
GRANT SELECT ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_superuser';
GRANT SELECT ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_read_only';


ALTER TABLE `HerediVar`.`variant_cancerhotspots_annotation`
CHARACTER SET = utf8 ;


ALTER TABLE `HerediVar`.`variant_cancerhotspots_annotation`
CHANGE COLUMN `cancertype` `cancertype` VARCHAR(500) CHARACTER SET 'utf8mb4' NOT NULL ,
CHANGE COLUMN `tissue` `tissue` VARCHAR(45) CHARACTER SET 'utf8mb4' NOT NULL ;


UPDATE `HerediVar`.`annotation_type` SET group_name = "None" WHERE title = "cancerhotspots_ac";
UPDATE `HerediVar`.`annotation_type` SET group_name = "None" WHERE title = "cancerhotspots_af";


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 = "tp53db_bayes_del";
--
--
-- CREATE TABLE `HerediVar`.`variant_cancerhotspots_annotation` (
-- `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
-- `variant_id` INT UNSIGNED NOT NULL,
-- `oncotree_symbol` VARCHAR(45) NOT NULL,
-- `cancertype` TEXT NOT NULL,
-- `tissue` TEXT NOT NULL,
-- `occurances` INT NOT NULL,
-- PRIMARY KEY (`id`),
-- UNIQUE INDEX `id_UNIQUE` (`id` ASC) );
--
--
-- ALTER TABLE `HerediVar`.`variant_cancerhotspots_annotation`
-- ADD COLUMN `annotation_type_id` INT UNSIGNED NOT NULL AFTER `occurances`;
--
--
-- INSERT INTO `HerediVar`.`annotation_type` (`title`, `display_title`, `description`, `value_type`, `version`, `version_date`, `group_name`, `is_transcript_specific`, `is_deleted`) VALUES ('cancerhotspots', 'cancerhotspots', 'The oncotree symbol, cancertype, tissue and number of occurances form the cancerhotspots database', 'text', 'v2', '2017-12-15', 'None', '0', '0');
--
--
-- UPDATE `HerediVar`.`annotation_type` SET is_deleted = 1 WHERE title = "cancerhotspots_cancertypes";
--
-- GRANT SELECT, INSERT, UPDATE, DELETE ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_annotation';
-- GRANT SELECT ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_user';
-- GRANT SELECT ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_superuser';
-- GRANT SELECT ON HerediVar.variant_cancerhotspots_annotation TO 'HerediVar_read_only';
--
--
-- ALTER TABLE `HerediVar`.`variant_cancerhotspots_annotation`
-- CHARACTER SET = utf8 ;
--
--
-- ALTER TABLE `HerediVar`.`variant_cancerhotspots_annotation`
-- CHANGE COLUMN `cancertype` `cancertype` VARCHAR(500) CHARACTER SET 'utf8mb4' NOT NULL ,
-- CHANGE COLUMN `tissue` `tissue` VARCHAR(45) CHARACTER SET 'utf8mb4' NOT NULL ;
--
--
-- UPDATE `HerediVar`.`annotation_type` SET group_name = "None" WHERE title = "cancerhotspots_ac";
-- UPDATE `HerediVar`.`annotation_type` SET group_name = "None" WHERE title = "cancerhotspots_af";
--
--
-- 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";
Expand Down

0 comments on commit 6915c9e

Please sign in to comment.