Skip to content

.date() creates datetime type columns in MSSQL  #85

@noedlm

Description

@noedlm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions