Hello folks:
I want to migrate an old application written in JavaScript using ASP classic to nodeJS. The problem is the backend database which is MS-SQL Server 2005. I'm in a little project to test the feasability of that migration. But I'm now stuck with an error in sequelize when it is trying to create a new table regarding the createdAt and updatedAt fields. Sequelize is trying to use a DATETIME2 datatype which does not exists yet in MS-SQL 2005. There is a way to specify which database level should be used by tedious through sequelize or a way that takes the DATETIME datatype instead the new one when I define a DATE field in my models?
This is the exact error message I received:
"Executing (default): IF OBJECT_ID('[Apps]', 'U') IS NULL CREATE TABLE [Apps] ([id] INTEGER NOT NULL IDENTITY(1,1) , [createdAt] DATETIME2 NOT NULL, [updatedAt] DATETIME2 NOT NULL, PRIMARY KEY ([id]));
Unhandled rejection SequelizeDatabaseError: Column, parameter, or variable #2: Cannot find data type DATETIME2."
Of course the table has more fields, but for some reason only those that are generated automatically appears in the create table sentence, which is another problem that I don't know why is happening.
Thanks in advance.