February 28, 2024 at 3:25 pm
Can someone please recommend a good deployment tool for a Postgres SQL Database
We are looking for something simliar to sqlpackage which is used in Visual Studio to deploy databases.
Looking for a tool that can either replace or update an existing Postgres database without removing the data in the tables.
February 29, 2024 at 2:25 pm
I'd suggest taking a look at Flyway. It's open source, but there's also a paid version with a lot more functionality.
Flyway uses a migrations based approach to deployments. That means it's basically a manifest of changes. "Add this column, then create this procedure that uses the column, then..." The migrations approach is much, much safer than the other standard approach using a comparison between your code and a database, or two databases, to arrive at a script for updating them. That mechanism often trips up on simple things like a column rename that migrations doesn't.
The paid version though uses a hybrid approach. This is because, in dev, but only in dev, the compare approach is better because it gives you object level tracking for your changes, which doesn't exist in a manifest of changes. It's worth exploring.
FULL DISCLOSURE: I work for Redgate, the company that makes the paid version. Flyway is still awesome.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply