cfwheels-dbmigrate-plugin icon indicating copy to clipboard operation
cfwheels-dbmigrate-plugin copied to clipboard

.date() creates datetime type columns in MSSQL

Open noedlm opened this issue 6 years ago • 0 comments

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.

noedlm avatar Jun 11 '18 19:06 noedlm