robmorgan/phinx — pull request #396 by dakota (2014-12-11 06:46:59+00:00)
Title: Fix sql server default creating and changing

Due to the way that the SqlServer adapter was creating default values, and the way the SqlServer handles blank default values, I was encountering issues with a `null` default, being treated as `''` or `0` default by SqlServer.

The causes problems with int columns where a null value should be treated differently to a `0` value. It also prevents the insertion of data into a table with a `uuid` column. SqlServer does not allow non-uuids to be inserted into a `uuid` column, the default value for the column is included in this check, even if a value is provided.

This PR adds a number of new tests to ensure that the SqlServer adapter handles defaults, and changing of defaults correctly. It also fixes the problems that were encountered.