In code from 2016 using sequelize ORM, I see model types defined with this pattern:
module.exports = function(sequelize, DataTypes) {
const Tasks = sequelize.define("Tasks", { id: {
type: DataTypes.INTEGER,
[ ...etc.]
However in the current sequelize docs you see most prominently documented: Sequelize.INTEGER
(or other type then integer).
At the same time in the current docs I find also DataTypes
still documented/used
: here.
On same page the Sequelize.INTEGER
is used..., is that only for deferrables or something?
I tried to find whether this altered over time or something but could not find it.
When Sequelize.INTEGER
is 'current solution' could I just alter above code into:
module.exports = function(sequelize, Sequelize) {
const Tasks = sequelize.define("Tasks", { id: {
type: Sequelize.INTEGER,
[ ...etc.]
Or would using Sequelize
as argument somehow make this fail?