S
SanyaKirilloff
Guest
SanyaKirilloff Asks: How to generate SQL file with INSERT INTO command using Liquibase?
I need to set up automatic deployment of empty DB scripts. I use Liquibase for this purpose. I do the following:
The resulting sql file should look like this:
I need to set up automatic deployment of empty DB scripts. I use Liquibase for this purpose. I do the following:
- Using the liquibase generateChangeLog command, I generate a file with changesets from the production base.
- Using the liquibase updateSql > update.sql command, I generate data for updating and rolling onto an empty database. The file turns out as a result big (I pump out all the DB as a matter of fact). And I need the file to be formed only with the INSERT INTO command to insert data into an empty database. How I can do this? My properties file looks like this:
Code:
changelogFile: 010-init-data.xml
driver: org.postgresql.Driver
url: jdbc:postgresql://1.1.1.1/amdb_prod
username: root
password: root
classpath: C:/Program Files/liquibase/internal/lib/postgresql.jar
dataOutputDirectory=data
liquibase.hub.mode=off
The resulting sql file should look like this:
- INSERT INTO TABLE_1 (...) VALUES (...)
- INSERT INTO TABLE_2 (...) VALUES (...)
- INSERT INTO TABLE_3 (...) VALUES (...) etc