Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure liquibase maven plugin to generate sql output for oracle

I have an spring/hibernate/mysql app, and I use liquibase maven plugin (Intellij Idea) to generate DB. Here is my liquibase.properties configuration:

url                 jdbc:mysql://localhost:3306/dbName
username            username
password            pass
changeLogFile       src/main/scripts/changeLog.xml
referenceUrl        hibernate:hibernate.cfg.xml
diffChangeLogFile   src/main/scripts/diffChangeLog.xml
driver              com.mysql.jdbc.Driver

As you can see, this works directly with the db, and change it on liquibase-update.

Question: Is there any option to change my configuration to generate sql output for oracle DB? So, not to work directly with database, but to create output script.

like image 557
Djordje Ivanovic Avatar asked Dec 12 '22 04:12

Djordje Ivanovic


1 Answers

Liquibase uses two separate actions for updating directly and generating SQL.

use mvn liquibase:update to update the database

use mvn liquibase:updateSQL to generate SQL

If the goal is bound to a lifecycle, you need to change that.

like image 159
Niels Bech Nielsen Avatar answered Jan 25 '23 23:01

Niels Bech Nielsen