mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
18 lines
486 B
SQL
18 lines
486 B
SQL
--
|
|
-- Update Events table to have MaxScoreFrameId
|
|
--
|
|
|
|
SELECT 'Checking for MaxScoreFrameId in Events';
|
|
SET @s = (SELECT IF(
|
|
(SELECT COUNT(*)
|
|
FROM INFORMATION_SCHEMA.COLUMNS
|
|
WHERE table_name = 'Events'
|
|
AND table_schema = DATABASE()
|
|
AND column_name = 'MaxScoreFrameId'
|
|
) > 0,
|
|
"SELECT 'Column MaxScoreFrameId already exists in Events'",
|
|
"ALTER TABLE `Events` ADD COLUMN `MaxScoreFrameId` int(10) unsigned default NULL AFTER `MaxScore`"
|
|
));
|
|
PREPARE stmt FROM @s;
|
|
EXECUTE stmt;
|