flexxnn / sequelize-auto-migrations

Migration generator && runner for sequelize
MIT License
258 stars 166 forks source link

Upgrade to sequelize >5.8.11 to fix vulnerability #63

Open staadecker opened 5 years ago

staadecker commented 5 years ago

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

goalia commented 5 years ago

Same issue here

tsjohns9 commented 5 years ago

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.
saulojoab commented 5 years ago

Is there any alternative for this package?

staadecker commented 5 years ago

Not that I'm aware of :(

saulojoab commented 5 years ago

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.

nvcken commented 5 years ago

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

        params: [
            "account",
            {

            },
            {}
        ]

@staadecker

BugKiller-tech commented 3 years ago

@nvcken did you solve this issue ?