Maven plugin to generate xml liquibase files from database
- DB2
- Oracle DataBase 11g and 12c (not yet)
- Basic PostgresSQL (not yet)
- Basic SQL Server (Tested 2017, Driver jTDS) (not yet)
- Command line for driver, user, pass and connectionString parameters
- TABLES
- AUTO INCREMENT (always increment and start by 1)
- DEFAULT VALUES (only string and numeric)
- INDEX CONSTRAINS
- UNIQUE CONSTRAINS
- PRIMARY KEY CONSTRAINS
- FOREIGN KEY CONSTRAINS (missing onDelete and onUpdate actions yet)
- VIEWS
- FUNCTIONS
- PROCEDURES
- SEQUENCES (not yet)
- RESET SEQUENCES (not yet)
- INSERT DATA TABLES (not yet)
- TRIGGERS (not yet)
- Data tables
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<version>11.5.0.0</version>
</dependency>
<dependency>
<groupId>com.jslsolucoes</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.1.4</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.3.1</version>
</dependency>
<plugin>
<groupId>com.github.yadickson</groupId>
<artifactId>autodblq</artifactId>
<version>...</version>
<executions>
<execution>
<goals>
<goal>generator</goal>
</goals>
</execution>
</executions>
<configuration>
<driver>...</driver>
<url>...</url>
<username>...</username>
<password>...</password>
<author>...</author>
<version>...</version>
<lqversion>...</lqversion>
<lqpro>...</lqpro>
<csvQuotchar>...</csvQuotchar>
<csvSeparator>...</csvSeparator>
<tables>
<param>...</param>
<param>...</param>
</tables>
<views>
<param>...</param>
<param>...</param>
</views>
<functions>
<param>...</param>
<param>...</param>
</functions>
<loadData>
<param>...</param>
<param>...</param>
</loadData>
<sortViews>
<param>...</param>
<param>...</param>
</sortViews>
<sortFunctions>
<param>...</param>
<param>...</param>
</sortFunctions>
<excludeTables>
<param>...</param>
<param>...</param>
</excludeTables>
<excludeViews>
<param>...</param>
<param>...</param>
</excludeViews>
<excludeFunctions>
<param>...</param>
<param>...</param>
</excludeFunctions>
<schemas>
<param>...</param>
<param>...</param>
</schemas>
</configuration>
</plugin>
JDBC Driver class name, examples:
com.ibm.db2.jcc.DB2Driver
oracle.jdbc.driver.OracleDriver
org.postgresql.Driver
net.sourceforge.jtds.jdbc.Driver
Database connection string, examples:
jdbc:db2://${host}:${port}/${db}
jdbc:oracle:thin:@${host}:${port}:${db}
jdbc:postgresql://${host}:${port}/${db}
jdbc:jtds:sqlserver://${host}:${port}/${db}
Database username
Database password
Liquibase version, default 3.6
Liquibase pro license, default false
Tables to include, example XY.*
Views to include, example VXY.*
Functions to include, example FXY.*
Schemas to include, example MN.*
Load data table content, example TXY.*
Csv Quotchar to load data table content
Csv Separator to load data table content
<plugin>
<groupId>com.github.yadickson</groupId>
<artifactId>autodblq</artifactId>
<version>...</version>
<configuration>
<tables>
<param>...</param>
<param>...</param>
</tables>
</configuration>
</plugin>
$ mvn autodblq:generator -Dautodblq.driver=... -Dautodblq.url=... -Dautodblq.username=... -Dautodblq.password=...
<plugin>
<groupId>com.github.yadickson</groupId>
<artifactId>autodblq</artifactId>
<version>...</version>
<executions>
<execution>
<goals>
<goal>generator</goal>
</goals>
</execution>
</executions>
<configuration>
<driver>...</driver>
<url>...</url>
<username>...</username>
<password>...</password>
<tables>
<param>...</param>
<param>...</param>
</tables>
</configuration>
</plugin>
<plugin>
<groupId>com.github.yadickson</groupId>
<artifactId>autodblq</artifactId>
<version>...</version>
<executions>
<execution>
<goals>
<goal>generator</goal>
</goals>
</execution>
</executions>
<configuration>
<driver>...</driver>
<url>...</url>
<username>...</username>
<password>...</password>
<schemas>
<param>...</param>
<param>...</param>
</schemas>
</configuration>
</plugin>