Open staadecker opened 5 years ago
Same issue here
Similiar to this, if you upgrade to the latest version of sequelize, this package will not work when you perform a migration. You will get something like the error below when running the migrate command
node ./node_modules/sequelize-auto-migrations/bin/makemigration.js --name tmp -x
/Users/tjohnson/Public/repos/scottsdale-event/node_modules/sequelize-auto-migrations/lib/migrate.js:452
let options = currentState[tableName].schema[df.path[2]];
^
TypeError: Cannot read property 'undefined' of undefined
at Object.parseDifference (/Users/tjohnson/Public/repos/scottsdale-event/node_modules/sequelize-auto-migrations/lib/migrate.js:452:65)
at Object.<anonymous> (/Users/tjohnson/Public/repos/scottsdale-event/node_modules/sequelize-auto-migrations/bin/makemigration.js:78:23)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
error Command failed with exit code 1.
Is there any alternative for this package?
Not that I'm aware of :(
Well, that sucks. I found this package which is pretty nice, it basically transforms your already existing database into models.
Sadly it doesn't auto update the DB when I change the models, but at least it's way better than doing things from ground zero.
I got empty table's column in migration script when run makemigration, occurs in sequelize 5.8.11
params: [
"account",
{
},
{}
]
@staadecker
@nvcken did you solve this issue ?
See : https://www.npmjs.com/advisories/1018