db.migration.V1_0_18__add_retry_backup_count.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of database Show documentation
Show all versions of database Show documentation
Swisscom's Open Service Broker API implementation
DROP PROCEDURE IF EXISTS add_retry_backup_count_to_backup_table;
DELIMITER //
CREATE PROCEDURE add_retry_backup_count_to_backup_table()
BEGIN
SET @col_exists = 1;
SELECT 0
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'backup'
AND column_name = 'retry_backup_count'
AND table_schema = database()
INTO @col_exists;
IF @col_exists = 1 THEN
ALTER TABLE backup
ADD COLUMN retry_backup_count tinyint(1) default 0 not NULL;
END IF;
END//
DELIMITER ;
CALL add_retry_backup_count_to_backup_table();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy