gbwey/persistent-odbc — pull request #7 by anton-dessiatov (2014-11-11 21:05:00+00:00)
Title: Make MS SQL migrations compatible with HDBC-odbc

I've uploaded a new version of HDBC-odbc, which is 2.4.0.0 to the Hackage. This version implements different query parameter binding for different SqlValue constructors to fix numerous issues with binary data and unicode strings passed as query parameters. This now means that when ODBC driver sees that bytestring is passed in place of nvarchar(64) column, it tries to perform a conversion based on current collation settings. This breaks migration scripts.

This pull request changes the type of the query parameter to PersistText (which makes sense beause it's text indeed, it was just passed as the bytestring previously to overcome the lack of proper parameter binding). It also bumps HDBC-odbc dependency to >= 2.4 because this fix will unfortunately break MS SQL migrations for the earlier HDBC-odbc versions.

Please also sorry for adding a bunch of changes that aren't really related to the fix, but are just the results of my text editor stripping the trailing whitespace.