sequelize-auto-migrations icon indicating copy to clipboard operation
sequelize-auto-migrations copied to clipboard

Upgrade to sequelize >5.8.11 to fix vulnerability

Open staadecker opened this issue 4 years ago • 7 comments

See : https://www.npmjs.com/advisories/1018

staadecker avatar Jul 11 '19 20:07 staadecker

Same issue here

goalia avatar Jul 23 '19 09:07 goalia

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.

tsjohns9 avatar Aug 03 '19 08:08 tsjohns9

Is there any alternative for this package?

saulojoab avatar Aug 15 '19 12:08 saulojoab

Not that I'm aware of :(

staadecker avatar Aug 15 '19 18:08 staadecker

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.

saulojoab avatar Aug 15 '19 19:08 saulojoab

I got empty table's column in migration script when run makemigration, occurs in sequelize 5.8.11

        params: [
            "account",
            {

            },
            {}
        ]

@staadecker

nvcken avatar Aug 28 '19 05:08 nvcken

@nvcken did you solve this issue ?

BugKiller-tech avatar Apr 09 '21 21:04 BugKiller-tech