Skip to content

Commit 377d95c

Browse files
Merge remote-tracking branch 'upstream/master' into ai_server
2 parents 28012c2 + 078b61f commit 377d95c

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

db/zm_create.sql.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,7 @@ CREATE TABLE `Notifications` (
13431343
`Interval` int unsigned NOT NULL DEFAULT 0,
13441344
`PushState` enum('enabled','disabled') NOT NULL DEFAULT 'enabled',
13451345
`AppVersion` varchar(32) DEFAULT NULL,
1346+
`Profile` varchar(128) DEFAULT NULL,
13461347
`BadgeCount` int NOT NULL DEFAULT 0,
13471348
`LastNotifiedAt` datetime DEFAULT NULL,
13481349
`CreatedOn` datetime DEFAULT NULL,

db/zm_update-1.39.3.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2+
--
3+
-- Add Profile column to Notifications table
4+
--
5+
6+
SET @s = (SELECT IF(
7+
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
8+
WHERE TABLE_SCHEMA = DATABASE()
9+
AND TABLE_NAME = 'Notifications'
10+
AND COLUMN_NAME = 'Profile'
11+
) > 0,
12+
"SELECT 'Column Profile already exists in Notifications'",
13+
"ALTER TABLE `Notifications` ADD `Profile` varchar(128) DEFAULT NULL AFTER `AppVersion`"
14+
));
15+
PREPARE stmt FROM @s;
16+
EXECUTE stmt;
17+
DEALLOCATE PREPARE stmt;
18+
119
-- Convert zone threshold fields (MinAlarmPixels, etc.) from pixel counts
220
-- to percentages of zone area, matching the coordinate percentage migration
321
-- done in zm_update-1.39.2.sql.
@@ -135,6 +153,7 @@ SET @s = (SELECT IF(
135153
"SELECT 'Menu_Items already has data'",
136154
"INSERT INTO `Menu_Items` (`MenuKey`, `Enabled`, `SortOrder`) VALUES
137155
('Console', 1, 10),
156+
('Watch', 1, 15),
138157
('Montage', 1, 20),
139158
('MontageReview', 1, 30),
140159
('Events', 1, 40),

0 commit comments

Comments
 (0)