Also check for Snapshots_Events in case both exist.
parent
b800a914fc
commit
23f5e02273
|
|
@ -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.'"
|
||||
));
|
||||
|
|
|
|||
Loading…
Reference in New Issue