datetime2 does not exists in MS-SQL Server 2005

214 views
Skip to first unread message

compa...@gmail.com

unread,
Oct 5, 2015, 3:33:35 AM10/5/15
to Sequelize
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.

Team Sequelize

unread,
Oct 6, 2015, 12:59:12 AM10/6/15
to compa...@gmail.com, Sequelize
IIRC we are supporting MSSQL 2008+. So chances are that you run into a lot of funny problems when using mssql 2005.

compa...@gmail.com

unread,
Oct 6, 2015, 11:14:23 PM10/6/15
to Sequelize, compa...@gmail.com
So the project is not feasible using Sequelize ORM, so I have to use tedious directly to migrate that application. Will MS-SQL Server 2005 be some day supported by sequelizer?

Team Sequelize

unread,
Oct 7, 2015, 12:32:13 AM10/7/15
to compa...@gmail.com, Sequelize
We don’t plan to extend the MSSQL support to also cover earlier versions as resources are too limited. If you know someone who is interested in maintaining support for MSSQL 2005 though, he / she is more than welcome to provide pull requests.
Reply all
Reply to author
Forward
0 new messages