no

Generate PostgreSQL Schema using Java and Execute on Another Database at Runtime

I. Problem How to copy a PostgreSQL schema from one data source to another using Liquibase at run-time. The schema from the source data...

I. Problem

How to copy a PostgreSQL schema from one data source to another using Liquibase at run-time. The schema from the source data source might change using Liquibase Java client, so all the changes are logged in the table databasechangelog. Note that the original changeset file will become outdated at this point.

II. Solution

Outline

  1. Export the changelog from the source data source into a temporary file.
  2. Execute the temporary file (XML) that contains the changelog to the new data source.

Here's the code


Related

coding 6343404943390076624

Post a Comment Default Comments

item