keithwhor / nodal

API Services Made Easy With Node.js
http://www.nodaljs.com/
MIT License
4.51k stars 209 forks source link

Add support for multiple named seeds and import them by name #273

Closed jasondecamp closed 1 year ago

jasondecamp commented 8 years ago

The use case here is for newly added tables to an existing application that need to be seeded without seeding the rest of the existing database. Much like how migrations are implemented more modularly, I would find it very helpful to be able to run something like the following:

nodal g:seed myNewModel

then update the seed file just like the existing seed.json and invoke it by name:

nodal db:seed myNewModel

How daunting of a task does this seem?

keithwhor commented 8 years ago

To be honest, for this use case (pre-populated tables) we probably want to refactor Migrations. I'm gonna be doing a lot of work on Nodal this weekend and I can give another look at how we might accomplish this better. :)

keithwhor commented 8 years ago

Still no solution for you in Nodal 0.12. I'll roadmap this for 0.13 which should be a week or two out.

keithwhor commented 8 years ago

... or three. ;)

jasondecamp commented 8 years ago

Pull request for a partial improvement: https://github.com/keithwhor/nodal/pull/289