Member-only story
Get The Structure Difference Between Two Databases
While developing, we are doing database table changes frequently. when migrating an app from Development to UAT or Production there is a high chance to miss some changes from databases.
Nowadays, Mosts of web frameworks provide ORM functionality to overcome these problems.
But still, sometimes we are curious to see the database structure differences of the two databases.
Some DB tools like DBeaver gives options to see the DB structure differences across different databases with their own format. We might want to see the differences in a different format.
If can get the metadata of the database then can define our own format to see the differences.
For a Case, I have taken the Postgresql. Following queries are used to get basic metadata of tables.
DB Config:
Expected Output Format: