migra icon indicating copy to clipboard operation
migra copied to clipboard

Allow comparing schema dumps

Open yashsriv opened this issue 6 years ago • 3 comments

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?

yashsriv avatar Mar 16 '18 18:03 yashsriv

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

thugdoubt avatar Mar 16 '18 18:03 thugdoubt

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.

djrobstep avatar Mar 16 '18 21:03 djrobstep

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

jflambert avatar Jul 10 '18 13:07 jflambert