-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
support-files/sql/2003_v2.x/2020_ci_quality-update_v2.0_mysql.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
USE devops_ci_quality; | ||
SET NAMES utf8mb4; | ||
|
||
DROP PROCEDURE IF EXISTS ci_quality_schema_update; | ||
|
||
DELIMITER <CI_UBF> | ||
|
||
CREATE PROCEDURE ci_quality_schema_update() | ||
BEGIN | ||
|
||
DECLARE db VARCHAR(100); | ||
SET AUTOCOMMIT = 0; | ||
SELECT DATABASE() INTO db; | ||
|
||
IF EXISTS(SELECT 1 | ||
FROM information_schema.COLUMNS | ||
WHERE TABLE_SCHEMA = db | ||
AND TABLE_NAME = 'T_QUALITY_CONTROL_POINT' | ||
AND COLUMN_NAME = 'ATOM_VERSION') THEN | ||
ALTER TABLE T_QUALITY_CONTROL_POINT MODIFY COLUMN ATOM_VERSION varchar(30) DEFAULT '1.0.0' NULL; | ||
END IF; | ||
IF EXISTS(SELECT 1 | ||
FROM information_schema.COLUMNS | ||
WHERE TABLE_SCHEMA = db | ||
AND TABLE_NAME = 'T_QUALITY_INDICATOR' | ||
AND COLUMN_NAME = 'ATOM_VERSION') THEN | ||
ALTER TABLE T_QUALITY_INDICATOR MODIFY COLUMN ATOM_VERSION varchar(30) DEFAULT '1.0.0' NOT NULL; | ||
END IF; | ||
|
||
COMMIT; | ||
END <CI_UBF> | ||
DELIMITER ; | ||
COMMIT; | ||
CALL ci_quality_schema_update(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters