Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1116 from ZoneMinder/add-index-to-frames
Add index to frames
- Loading branch information
Showing
5 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- | ||
-- This updates a 1.28.107 database to 1.28.108 | ||
-- | ||
|
||
-- | ||
-- Update Frame table to have an Index on EventId, per the change made in 1.28.107 | ||
-- | ||
SET @s = (SELECT IF( | ||
(SELECT COUNT(*) | ||
FROM INFORMATION_SCHEMA.STATISTICS | ||
WHERE table_name = 'Frames' | ||
AND table_schema = DATABASE() | ||
AND index_name='EventId_idx'; | ||
) > 0, | ||
"SELECT 'EventId Index already exists on Frames table'", | ||
"CREATE INDEX `EventId_idx` ON `Frames` (`EventId`)" | ||
)); | ||
|
||
PREPARE stmt FROM @s; | ||
EXECUTE stmt; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.28.107 | ||
1.28.108 |