if exists (SELECT * FROM sys.indexes WHERE name = 'CI_ConnectionWikiHistory_ConnectionID' AND object_id = OBJECT_ID('dbo.ConnectionHandbookHistory')) and not exists (SELECT * FROM sys.indexes WHERE name = 'CI_ConnectionHandbookHistory_ConnectionID' AND object_id = OBJECT_ID('dbo.ConnectionHandbookHistory'))
	exec sp_rename N'dbo.ConnectionHandbookHistory.CI_ConnectionWikiHistory_ConnectionID', N'CI_ConnectionHandbookHistory_ConnectionID', N'INDEX';