forked from sequelize/cli
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
What you are doing?
I am trying to generate a model that has a migration with it
import {
QueryInterface,
SequelizeStatic,
} from 'sequelize';
export = {
up: (queryInterface: QueryInterface, Sequelize: SequelizeStatic) => {
return queryInterface.createTable('Devices', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
deviceName: {
type: Sequelize.STRING
},
imei: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: (queryInterface: QueryInterface, Sequelize: SequelizeStatic) => {
return queryInterface.dropTable('Devices');
}
};What do you expect to happen?
I expected SequelizeStatic to be working and to be declared
What is actually happening?
However, SequelizeStatic apparently doesn't exist, why is that?
Image of the error
Module '"../../node_modules/sequelize/types"' has no exported member 'SequelizeStatic'.ts(2305)
Dialect: mysql / postgres / sqlite / mssql / any
Database version: 9.5
Sequelize CLI version: 3.2.0-c
Sequelize version: 5.22.3
fredcy, marlongerson and benjamin-wunder
Metadata
Metadata
Assignees
Labels
No labels