6 ms·
We use it in our CI, just before deployment, to compare the DB structure of what's being tested with the DB structure of our staging or production environment.
by paps 7y ago
We use it in our CI, just before deployment, to compare the DB structure of what's being tested with the DB structure of our staging or production environment.
It's a last minute check that prevented a lot of mistakes.
- larkost 7y agoWouldn't a dump and then diff of the schema into text form accomplish the same thing?
- fanf2 7y agoOr something a bit more high-level like Migra? https://github.com/djrobstep/migra https://github.com/djrobstep/migra
- hobs 7y agoIt absolutely should, though you might want to have a specific set of questions you ask in an ordered fashion as things like column order might differ between production and development due to data sizes, dropping and recreating dev instead of migration, etc. None of those things actually being a problem could give you false positives, so you might want some minor shuffling.
- djrobstep 7y agoYou might be interested in the service I'm building, which does a similar thing in a more structured way: https://djrobstep.com/ci-for-databases https://djrobstep.com/ci-for-databases