Hi all,
I'm having a problem where inserts to varbinar(max) columns in MSSQL are failing with the error "implicit conversion from varchar to varbinary" not allowed. I'm proposing to resolve this by using an explicit conversion in the sql, based on the type attribute of the insert.
This changeset:
<changeSet author="Racer.Mj" id="1367">
<insert tableName="tablecontainingbinary">
<column name="id" valueNumeric="1"/>
<column name="mybinarycolumn" type="LONGBLOB" value="89504E470D0A1A0A0000000D4948445"/>
</insert>
</changeset>
Would create something like this:
insert into tablecontainingbinary (id, mybinarycolumn)
values (1, convert(varbinary(max), "89504E470D0A1A0A0000000D4948445"));
Changesets without the type="LONGBLOB" reminder would not include the convert. LIke this:
insert into tablecontainingbinary (id, mybinarycolumn)
values (1, "89504E470D0A1A0A0000000D4948445");
My question is: where should I extend the Liquibase classes to do this?