DELIMITER $$
DROP procedure IF EXISTS `Script`;
CREATE PROCEDURE `Script` ()
BEGIN

select count(1) into @var_Column_count from information_schema.COLUMNS where TABLE_NAME='osd' and TABLE_SCHEMA='kms' AND COLUMN_NAME='content_identifier';
if (@var_Column_count = 0) then 
    ALTER TABLE kms.`osd` ADD `content_identifier` int(8) NOT NULL AFTER `language`, ADD `start_time` datetime DEFAULT NULL AFTER `is_scrolling`, ADD `polarization` int(1) NOT NULL AFTER `start_time`, ADD `marque` int(1) NOT NULL AFTER `polarization`, ADD `width` int(11) NOT NULL AFTER `marque`, ADD `trigger_from` int(1) NOT NULL AFTER `is_enabled`;
end if;

END $$
DELIMITER ;

use kms;
call Script();
DROP procedure IF EXISTS `Script`;