keithwhor / nodal

API Services Made Easy With Node.js

Home Page:http://www.nodaljs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for multiple named seeds and import them by name

jasondecamp opened this issue · comments

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?

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. :)

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

... or three. ;)

Pull request for a partial improvement: #289