set@sqlstmt:=if(@exist>0,'DROP INDEX Events_Hour_MonitorId_StartTime_idx ON Events_Hour',"SELECT 'Events_Hour_MonitorId_StartTime_idx INDEX is already removed.'");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Hour_MonitorId_idx INDEX already exists.'","CREATE INDEX `Events_Hour_MonitorId_idx` ON `Events_Hour` (`MonitorId`)");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Hour_StartTime_idx INDEX already exists.'","CREATE INDEX `Events_Hour_StartTime_idx` ON `Events_Hour` (`StartTime`)");
set@sqlstmt:=if(@exist>0,'DROP INDEX Events_Day_MonitorId_StartTime_idx ON Events_Day',"SELECT 'Events_Day_MonitorId_StartTime_idx INDEX is already removed.'");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Day_MonitorId_idx INDEX already exists.'","CREATE INDEX `Events_Day_MonitorId_idx` ON `Events_Day` (`MonitorId`)");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Day_StartTime_idx INDEX already exists.'","CREATE INDEX `Events_Day_StartTime_idx` ON `Events_Day` (`StartTime`)");
set@sqlstmt:=if(@exist>0,'DROP INDEX Events_Week_MonitorId_StartTime_idx ON Events_Week',"SELECT 'Events_Week_MonitorId_StartTime_idx INDEX is already removed.'");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Week_MonitorId_idx INDEX already exists.'","CREATE INDEX `Events_Week_MonitorId_idx` ON `Events_Week` (`MonitorId`)");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Week_StartTime_idx INDEX already exists.'","CREATE INDEX `Events_Week_StartTime_idx` ON `Events_Week` (`StartTime`)");
set@sqlstmt:=if(@exist>0,'DROP INDEX Events_Month_MonitorId_StartTime_idx ON Events_Month',"SELECT 'Events_Month_MonitorId_StartTime_idx INDEX is already removed.'");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Month_MonitorId_idx INDEX already exists.'","CREATE INDEX `Events_Month_MonitorId_idx` ON `Events_Month` (`MonitorId`)");
set@sqlstmt:=if(@exist>0,"SELECT 'Events_Month_StartTime_idx INDEX already exists.'","CREATE INDEX `Events_Month_StartTime_idx` ON `Events_Month` (`StartTime`)");