programmatically generate liquibase-compare-file for prod-release 2025-01-28 #153

Merged
hsh-michaelhoennig merged 7 commits from feature/programmatically-generate-liquibase-compare-file into master 2025-01-30 09:36:37 +01:00
Showing only changes of commit fd94a12946 - Show all commits

View File

@ -112,13 +112,13 @@ public class LiquibaseCompatibilityIntegrationTest {
final var sqlDumpFile = new File(targetFileName.getParent(), "." + targetFileName.getName());
final var pb = new ProcessBuilder(
"pg_dump", "--column-inserts", "--disable-dollar-quoting",
"--host=" + getJdbcDatabaseContainer().getHost(),
"--host=" + jdbcDatabaseContainer.getHost(),
"--port=" + jdbcDatabaseContainer.getFirstMappedPort(),
"--username=" + getJdbcDatabaseContainer().getUsername() ,
"--username=" + jdbcDatabaseContainer.getUsername() ,
"--dbname=" + jdbcDatabaseContainer.getDatabaseName(),
"--file=" + sqlDumpFile.getCanonicalPath()
);
pb.environment().put("PGPASSWORD", getJdbcDatabaseContainer().getPassword());
pb.environment().put("PGPASSWORD", jdbcDatabaseContainer.getPassword());
final var process = pb.start();
int exitCode = process.waitFor();
@ -138,11 +138,8 @@ public class LiquibaseCompatibilityIntegrationTest {
--
CREATE ROLE postgres;
CREATE ROLE admin;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO admin;
CREATE ROLE restricted;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO restricted;
""";
writeStringToFile(targetFileName, header, UTF_8, false); // false = overwrite