"Couldn't run query: ALTER TABLE "SiteTree_versions" RENAME "__TEMP__SiteTree_Versions

**Silverstripe Version: 4 **

I have an existing website, I added a new controller which worked fine in localhost, But when I uploaded on live, I am getting following error log, I tried to revert back (removed the newly added controller, still getting same error).

[2018-10-09 18:47:50] error-log.ERROR: Uncaught Exception SilverStripe\ORM\Connect\DatabaseException: “Couldn’t run query: ALTER TABLE “SiteTree_versions” RENAME “__TEMP__SiteTree_Versions” Table ‘__TEMP__SiteTree_Versions’ already exists”

Below is my code