3 ms·
You can use database schema compare tools for this. You create a clean empty database using the new DDL and use the tool to compare that schema with the schema
by rvdginste 5y ago
You can use database schema compare tools for this. You create a clean empty database using the new DDL and use the tool to compare that schema with the schema for the version in test or prod. The tool will then show the differences and can create a sql script to update the database in test or prod.
I've used this a lot with SQL Server and used the Redgate tools for that and that worked very well. For PostgreSQL, it seems there's a free tool from devart: dbForge Schema Compare [0]. I've never used it and have no idea how well it works...
[0]: https://www.devart.com/dbforge/postgresql/schemacompare/download.html https://www.devart.com/dbforge/postgresql/schemacompare/down...