nobbyknox / hal

Home automation system
Apache License 2.0
0 stars 0 forks source link

Shared database schema for all environments #20

Closed nobbyknox closed 8 years ago

nobbyknox commented 8 years ago

Maybe it is a bad idea to have a separate schema via the Knex.js migration scripts for the unit test environment. We have a lovely schema.sql file that is used to create the other environments, including production. It would be first prize if we can use this for unit tests as well and retire the migration scripts of Knex.js.

nobbyknox commented 8 years ago

I just realised that we also have a seeds.sql file with seed data. Can we use this in the same way as I proposed we do with the schema script?

nobbyknox commented 8 years ago

We now have a new mechanism for loading the schema and seed data during unit testing. It uses the same production schema file and current seed data.