- missing procedures call
 - Remove duplicated line in migration procedure
issue#7
Guillaume HOMBERG 2017-12-14 09:59:21 +01:00
parent c8180005ad
commit 9110df8bba
2 changed files with 7 additions and 2 deletions

View File

@ -63,3 +63,5 @@ BEGIN
ALTER TABLE `vulnerabilities` ADD description_translation_id INT(11), ADD label_translation_id INT(11);
END;;
DELIMITER ;
CALL add_new_translation_id_columns;

View File

@ -2418,14 +2418,16 @@ CALL `duplicate_data_vulnerabilities`;
-- Procedure to delete old hard-codded translations columns in tables
DROP PROCEDURE IF EXISTS delete_old_translation_columns;
DELIMITER ;;
CREATE PROCEDURE delete_old_translation_columns ()
BEGIN
ALTER TABLE anrs DROP COLUMN label1, DROP COLUMN label2, DROP COLUMN label3, DROP COLUMN label4, DROP COLUMN description1, DROP COLUMN description2, DROP COLUMN description3, DROP COLUMN description4;
ALTER TABLE assets DROP COLUMN label1, DROP COLUMN label2, DROP COLUMN label3, DROP COLUMN label4, DROP COLUMN description1, DROP COLUMN description2, DROP COLUMN description3, DROP COLUMN description4;
ALTER TABLE guides DROP COLUMN description1, DROP COLUMN description2, DROP COLUMN description3, DROP COLUMN description4;
ALTER TABLE guides_items DROP COLUMN description1, DROP COLUMN description2, DROP COLUMN description3, DROP COLUMN description4;
ALTER TABLE historicals DROP COLUMN label1, DROP COLUMN label2, DROP COLUMN label3, DROP COLUMN label4;
ALTER TABLE assets DROP COLUMN label1, DROP COLUMN label2, DROP COLUMN label3, DROP COLUMN label4, DROP COLUMN name1, DROP COLUMN name2, DROP COLUMN name3, DROP COLUMN name4;
ALTER TABLE instances DROP COLUMN label1, DROP COLUMN label2, DROP COLUMN label3, DROP COLUMN label4, DROP COLUMN name1, DROP COLUMN name2, DROP COLUMN name3, DROP COLUMN name4;
ALTER TABLE measures DROP COLUMN description1, DROP COLUMN description2, DROP COLUMN description3, DROP COLUMN description4;
ALTER TABLE models DROP COLUMN label1, DROP COLUMN label2, DROP COLUMN label3, DROP COLUMN label4, DROP COLUMN description1, DROP COLUMN description2, DROP COLUMN description3, DROP COLUMN description4;
ALTER TABLE objects DROP COLUMN label1, DROP COLUMN label2, DROP COLUMN label3, DROP COLUMN label4, DROP COLUMN name1, DROP COLUMN name2, DROP COLUMN name3, DROP COLUMN name4;
@ -2442,3 +2444,4 @@ BEGIN
END;;
DELIMITER ;
CALL delete_old_translation_columns;