Testing for MSSQL and the UserHistoryItem table. We need MSSQL to be cause-insensitive by default so that column
names are case insensitive. However, this causes problems with the UserHistoryItem table where there is a unique
index on the ('UserName,Type,EntityId') columns. Basically, JIRA was doing a case sensitive compare on 'EntityId' while
the database was not which meant that JIRA tried to insert a duplicate (e.g. ('admin', 'assignee', 'Assignee') and
('admin', 'assignee', 'assignee')) if the case of a username changed (NOTE: The case problem is in the EntityId
column and not the UserName).
From 5.2 onwards we insert items into the UserHistoryItem table when an issue is created or assigned. This meant
that a duplicate key error could cause JIRA to stop creating issues because a DB runtime exception is thrown.