Add column Decoder to Monitors
parent
af6d2c6ca3
commit
dc2df16328
|
@ -543,6 +543,7 @@ CREATE TABLE `Monitors` (
|
|||
`Palette` int(10) unsigned NOT NULL default '0',
|
||||
`Orientation` enum('ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT') NOT NULL default 'ROTATE_0',
|
||||
`Deinterlacing` int(10) unsigned NOT NULL default '0',
|
||||
`Decoder` varchar(32),
|
||||
`DecoderHWAccelName` varchar(64),
|
||||
`DecoderHWAccelDevice` varchar(255),
|
||||
`SaveJPEGs` TINYINT NOT NULL DEFAULT '3' ,
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE()
|
||||
AND table_name = 'Monitors'
|
||||
AND column_name = 'Decoder'
|
||||
) > 0,
|
||||
"SELECT 'Column Decoder already exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `Decoder` varchar(32) AFTER `Deinterlacing`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
Loading…
Reference in New Issue