sequelize / cli

The Sequelize CLI
MIT License
2.53k stars 529 forks source link

Problem running migrations with yarn #1430

Closed Zoharyal closed 9 months ago

Zoharyal commented 9 months ago

What you are doing?

I'm trying to run a yarn script: "db-up": "ts-node -r esm ./node_modules/.bin/sequelize-cli db:migrate" with config in .sequelizerc. I have a migrations file in my migrations folder.

require("babel-register");

const path = require('path');

module.exports = {
  'config': path.resolve('database.js'),
  'models-path': path.resolve(__dirname, 'src/models'),
  'seeders-path': path.resolve('seeders'),
  'migrations-path': path.resolve('migrations')
}

What do you expect to happen?

I expect migrations to run and console to log: Loaded configuration file "database.js". Using environment "development".

What is actually happening?

Console only logging: Sequelize CLI [Node: 16.18.1, CLI: 6.6.2, ORM: 6.6.2].

And no migrations are executed

Dialect: postgres Database version: 8.11.3 Sequelize CLI version: 6.6.2 Sequelize version: 6.6.2