domasx2 / sequelize-fixtures

Load data from json, yaml or js to sequelize
301 stars 83 forks source link

Add support for generating fixtures #106

Closed ninapavlich closed 4 years ago

ninapavlich commented 5 years ago

Forgive me if this exists already somewhere else, but what is the recommended method for generating JSON from the database that can be later imported through this tool?

If it doesn't exist already, I think it would be helpful to provide a command that is the inverse of the loadFile function, perhaps taking an array of models to include.

matmar10 commented 4 years ago

This is likely out of scope for this project, but it would be interesting of we added a small adaptor logic or CLI script that could use a peer dependency like https://www.npmjs.com/package/faker

Will close this but if you decide to work on support for integrating something like faker please re-open.