parent
c131d0f108
commit
a6ece1ad3c
|
@ -29,3 +29,14 @@ CREATE INDEX custom_field_template_template_id_index
|
|||
CREATE INDEX test_case_review_test_case_review_id_index
|
||||
ON test_case_review_test_case(review_id);
|
||||
|
||||
DROP PROCEDURE IF EXISTS schema_change_api;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE schema_change_api() BEGIN
|
||||
DECLARE CurrentDatabase VARCHAR(100);
|
||||
SELECT DATABASE() INTO CurrentDatabase;
|
||||
IF NOT EXISTS (SELECT * FROM information_schema.statistics WHERE table_schema=CurrentDatabase AND table_name = 'api_scenario_report_result' AND index_name = 'report_id_index') THEN
|
||||
ALTER TABLE `api_scenario_report_result` ADD INDEX report_id_index ( `report_id` );
|
||||
END IF;
|
||||
END//
|
||||
DELIMITER ;
|
||||
CALL schema_change_api();
|
Loading…
Reference in New Issue