News for hackers. Stuff that matters.
Re:Get PostgreSQL Database Structure as a Detailed JavaScrip... by paps on Thursday December 05, 2019 @03:30PM (#21716159)
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.

Re:Get PostgreSQL Database Structure as a Detailed JavaScrip... by djrobstep on Thursday December 05, 2019 @09:35PM (#21718797)
You 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
Re:Get PostgreSQL Database Structure as a Detailed JavaScrip... by larkost on Thursday December 05, 2019 @07:32PM (#21718262)
Wouldn't a dump and then diff of the schema into text form accomplish the same thing?
Re:Get PostgreSQL Database Structure as a Detailed JavaScrip... by hobs on Thursday December 05, 2019 @08:58PM (#21718656)
It 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.

Re:Get PostgreSQL Database Structure as a Detailed JavaScrip... by fanf2 on Thursday December 05, 2019 @07:56PM (#21718384)
Or something a bit more high-level like Migra? https://github.com/djrobstep/migra