I have two postgres databases which should have an equal db-schema, but have not.
I want to see the difference in the column order.
Columns of table1 in Dev: id, foo, bar
Columns of table1 in Prod: id, bar, foo
Strategy 1: list of columns
This is my current strategy to solve this.
Dump all columns of the database like this:
table1.id table1.foo table1.bar table2.id table2....
If I have a simple ascii list of both sides, I can use a diff tool to compare both db schemas.
I found ways to output all columns like above but the solutions don't support ordering by the schema of the table.
How to show the difference of the column order in two databases?
Other strategies are welcome.
Implementation: I use postgres 9.3