zoneminder/db/zm_update-1.31.12.sql

24 lines
460 B
SQL

--
-- This adds Manufacturers and Models
--
SET @s = (SELECT IF(
(SELECT COUNT(*)
FROM INFORMATION_SCHEMA.TABLES
WHERE table_name = 'MontageLayouts'
AND table_schema = DATABASE()
) > 0,
"SELECT 'MontageLayouts table exists'",
"
CREATE TABLE MontageLayouts (
`Id` int(10) unsigned NOT NULL auto_increment,
`Name` TEXT NOT NULL,
`Positions` JSON,
PRIMARY KEY (`Id`)
);
"
));
PREPARE stmt FROM @s;
EXECUTE stmt;