mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
Also check for Snapshots_Events in case both exist.
This commit is contained in:
@@ -4,11 +4,9 @@
|
||||
|
||||
SELECT 'Checking For Snapshot_Events Table which should be Snapshots_Events';
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE table_name = 'Snapshot_Events'
|
||||
AND table_schema = DATABASE()
|
||||
) > 0,
|
||||
((SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'Snapshot_Events' AND table_schema = DATABASE()) > 0)
|
||||
AND
|
||||
((SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'Snapshots_Events' AND table_schema = DATABASE()) = 0),
|
||||
"ALTER TABLE Snapshot_Events RENAME TO Snapshots_Events",
|
||||
"SELECT 'Snapshot_Event table does not exist, good.'"
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user