sequelize-models (v1.4.0) is a utility library for SequelizeJS ORM that automatically loads database tables and associations as Sequelize models. It supports MySQL and PostgreSQL, and allows explicit model definitions with associations. Released in 2018 and no longer actively maintained, the project is planned for a rewrite. Key differentiators: auto-loading from database schema, simplified model syntax, and association definitions in one place. Requires Node.js >=4 and Sequelize 4.37.x.
npm install sequelize-modelsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Instantiates SequelizeModels with MySQL connection, auto-loads models from database schema, and logs loaded model names.
Consider using sequelize@>=5 and this package may not work. Switch to sequelize-auto or define models manually.
Upgrade Node.js to latest LTS, but package may not be compatible. Test in your environment.
Use 'schema' instead of 'database' in connection configuration.
Use CommonJS require(). If using ESM, use createRequire or dynamic import.
Ensure all tables have primary keys and use supported types (string, integer, date, boolean, etc.).
Install mysql2@>=2.0.0 or alter MySQL user to use mysql_native_password.
Run 'npm install pg pg-hstore'.
Use 'const SequelizeModels = require('sequelize-models');' (CommonJS). If using ESM, try 'import SequelizeModels from 'sequelize-models';'.Instantiate with 'new SequelizeModels(config)'.