moodseller / sequelize-cli-typescript

The Sequelize CLI
MIT License
5 stars 14 forks source link

New migration can't be created because directory already exists #5

Open diegoulloao opened 4 years ago

diegoulloao commented 4 years ago

What you are doing?

Create a new migration file in a existent directory with others migrations

sequelize migration:generate --name m1

What do you expect to happen?

A new migration file appears

What is actually happening?

Sequelize can't create new migration because migrations directory already exists.

diego:server/ (seqtsc✗) $ sequelize migration:generate --name m1                                          [13:12:47]
sequelize no existe. Tratando con npx...

Sequelize CLI [Node: 12.8.1, CLI: 3.2.0-c, ORM: 5.21.4]

migrations folder at "/Users/diego/Desktop/Proyectos/mern-auth-template/server/src/database/migrations" already exists.
ENOENT: no such file or directory, open '/Users/diego/Desktop/Proyectos/mern-auth-template/server/node_modules/sequelize-cli-typescript/lib/assets/migrations/skeleton.js'

Dialect: mysql Database version: 5.6 Sequelize CLI version: 3.2.0-c Sequelize version: 5.21.4

andrrms commented 3 years ago

Any updates on this?

michaelca365 commented 3 years ago

there's an error when migration_generate.js render the template migrations/skeleton.js. it must be skeleton.ts

ldgmaia commented 1 year ago

I am facing the exact same error using Postgres. There is no such file (migrations/skeleton.js) in the node_modules. Is this a bug or just some configuration missing?

mahmoudyusof commented 10 months ago

+1