djrobstep / migra

Like diff but for PostgreSQL schemas
https://databaseci.com/docs/migra
The Unlicense
2.92k stars 125 forks source link

Allow comparing schema dumps #27

Open yashsriv opened 6 years ago

yashsriv commented 6 years ago

Hi, is there any way I could compare two schema dumps?

As far as I can see in the code, the library you have used can only work with SQLAlchemy Connections. Would there be some way to create a mock connection with data from the schema dump sql files?

thugdoubt commented 6 years ago

@yashsriv there's an app for that: https://www.apgdiff.com/

djrobstep commented 6 years ago

Yes migra works with actual connections, not dump files. But you can just create two temporary databases, load the files, and compare them once loaded.

In the docs there's some code that shows you how to spin up temporary databases just for this purpose.

jflambert commented 6 years ago

@thugdoubt Sorry but apgdiff is broken for PostgreSQL 10 and up