Skip to content

Commit

Permalink
docs(mssql): clarify in comments and docs supports MS SQL versions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
João Eiras committed Jan 24, 2022
1 parent 3b253ed commit 11e8cfa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/manual/other-topics/dialect-specific-things.md
Expand Up @@ -113,7 +113,11 @@ const sequelize = new Sequelize('database', 'username', 'password', {

### MSSQL

The underlying connector library used by Sequelize for MSSQL is the [tedious](https://www.npmjs.com/package/tedious) npm package (version 6.0.0 or above).
The supported versions of MS SQL are from MS SQL 2017 (version 14) up to the most recent version.

#### Tedious

The default underlying connector library used by Sequelize for MSSQL is the [tedious](https://www.npmjs.com/package/tedious) npm package.

You can provide custom options to it using `dialectOptions.options` in the Sequelize constructor:

Expand Down
6 changes: 6 additions & 0 deletions docs/manual/other-topics/upgrade-to-v7.md
Expand Up @@ -30,3 +30,9 @@ sequelize.connectionManager.getConnection({ type: 'SELECT' });
// Do this:
sequelize.connectionManager.getConnection({ type: 'read' });
```

### Microsoft SQL Server Support

Sequelize v7 fully supports MS SQL Server 2017 (version 14) onwards, up from 2012 (version 13) in
Sequelize v6, as this matches Microsoft's own [mainstream support](
https://docs.microsoft.com/en-us/sql/sql-server/end-of-support/sql-server-end-of-life-overview?view=sql-server-ver15#lifecycle-dates).
8 changes: 7 additions & 1 deletion lib/dialects/mssql/index.js
Expand Up @@ -51,7 +51,13 @@ class MssqlDialect extends AbstractDialect {
}
}

MssqlDialect.prototype.defaultVersion = '12.0.2000'; // SQL Server 2014 Express, minimum supported version
// SQL Server 2017 Express (version 14), minimum supported version, all the way
// up to the most recent version. When increasing this version, remember to
// update also the minimum version in the documentation at
// docs/manual/other-topics/dialect-specific-things.md
// and set the relevant years for the mssql Docker images in the ci.yml file at
// .github/workflows/ci.yml
MssqlDialect.prototype.defaultVersion = '14.0.1000';
MssqlDialect.prototype.Query = Query;
MssqlDialect.prototype.name = 'mssql';
MssqlDialect.prototype.TICK_CHAR = '"';
Expand Down

0 comments on commit 11e8cfa

Please sign in to comment.