Skip to content
Advertisement

Sequelize CLI migration error “Cannot read property ‘type’ of undefined” when creating table with db:migrate

I’m running yarn sequelize db:migrate to create the table in the database using a postgres image in the docker and returns the following message:

JavaScript

Configuration of the .sequelizerc file:

JavaScript

Code to create the table in the file migrations.js:

JavaScript

OS: Linux Focal Fossa 20.04 LTS

Would anyone know what the possible solution would be?

Advertisement

Answer

Error seems to be a typo, the type for Sequelize.DATA vs Sequelize.DATE.

Here are the valid data types.

https://sequelize.org/v5/manual/data-types.html

Advertisement