Monday 29 October 2018

I'm not sure I understand migrations in KnexJS.

So I created a migration with knex migrate:make create_tables, and whenever I update my DB structure, I do:knex migrate:rollback knex migrate:latest Which makes me lose whatever values were in the table, but that's fine. I can just seed a few dummy rows in there no problem.Should I keep everything in one migration file? Should I make a migration file every time I want to add a table, or tweak a table?I'm working on a 6-month long project, and I'm in the beginning stages now, so I'm always editing the DB structure little by little.

Submitted October 29, 2018 at 02:12PM by v_95

No comments:

Post a Comment