tdm00/cfwheels-dbmigrate-plugin — pull request #74 by jordanclark (2013-03-28 20:32:30+00:00)
Title: Better Identity_insert for SQL Server

These changes are mainly to improve the IDENTITY_INSERT feature added for SQL Server.

I've moved building SQL INSERT into the abstract adapter, this way the custom adapters can extend the code if necessary instead of just a prefix/suffix method.

For the Microsoft SQL adapter I check if any column being inserted into is an IDENTITY column, and then wrap the IDENTITY_INSERT code when necessary, before it would only work if your identity column happened to be named "id".

I also improved the $getColumnDefinition function which wasn't using the "pattern" argument to only return a single column instead of the whole database.