AsciidoctorJ Liquibase Extension
This AsciidoctorJ extension provides a macro to generate a entity relationship diagram based on liquibase changeset files. Currently only xml format for liquibase changeset files are supported. This extensions needs asciidoctor-diagram extension to work probably.
Installation
To use this extension declare it as a dependency in asciidoctor-maven-plugin configuration or asciidoctor-gradle-plugin.
Prerequisites: * graphviz - https://graphviz.org/
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>LATEST</version>
<executions>
<execution>
<id>output-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html</backend>
</configuration>
</execution>
</executions>
<dependencies>
<dependency> <!--(1)-->
<groupId>com.uniqueck</groupId>
<artifactId>asciidoctorj-liquibase-extension</artifactId>
<version>LATEST</version> <!--(2)-->
</dependency>
</dependencies>
</plugin>
-
asciidoctorj-liquibase-extension is added
-
check for the latest version at Maven central
How To Use
liquibase::src/test/resources/db/db.changelog-master.xml[]
liquibase::src/test/resources/db/db.changelog-master.xml[tillTag=1.X.FINAL]
liquibase::src/test/resources/db/db.changelog-master.xml[fileName = diagram]
liquibase::src/test/resources/db/db.changelog-master.xml[fileName = diagram, outputFormat = svg]
Attributes
-
tillTag parse liquibase changeset files only until tagDatabase matched definied value
-
fileName generates a diagram with the specified file name.
-
outputFormat generates a diagram with the specified format. Only png and svg formats are supported.
Note: the fileName attribute has to be present for the output format to be considered.
ToDo
-
Styling of PlantUML like Draw IO
-
Support both styles of ERD
-
Styling options
-
with or without datatypes
-
line connections
-
-
see for grouping and associations http://plantuml.com/de/class-diagram
-
see for entity relationship diagram http://plantuml.com/de/ie-diagram
-
define how to detect cardinality of relationships