cfwheels-dbmigrate-plugin
cfwheels-dbmigrate-plugin copied to clipboard
.date() creates datetime type columns in MSSQL
Example:
t = createTable(name='testTable');
t.date(columnNames="startat,endat");
t.timestamps();
t.create();
This will create datetime
type columns for startat
and endat
.
In the file adapters\MicrosoftSQLServer.cfc
I noticed variables.sqlTypes['date'] = {name='DATETIME'}
, same as the datetime variable. I switched it to variables.sqlTypes['date'] = {name='DATE'}
to test it on my instance and the date columns were now set to the DATE data type as expected.
I'm not familiar with the whole codebase for this plugin but if that's the only change required for this bug fix, I can submit a pull request.