Navigation Menu

Skip to content

uniqueck/asciidoctorj-liquibase-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsciidoctorJ Liquibase Extension

GitHub Actions MIT License badge

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>
  1. asciidoctorj-liquibase-extension is added

  2. check for the latest version at Maven central

How To Use

liquibase macro without attributes
liquibase::src/test/resources/db/db.changelog-master.xml[]
db.changelog master
Figure 1. Generated image for liquibase macro
liquibase macro with attribute tillTag set to 1.X.FINAL
liquibase::src/test/resources/db/db.changelog-master.xml[tillTag=1.X.FINAL]
db.changelog master 1.X.FINAL
Figure 2. Generated image for liquibase macro with attribute tillTag
liquibase macro with attribute fileName set to diagram
liquibase::src/test/resources/db/db.changelog-master.xml[fileName = diagram]
liquibase macro with attribute outputFormat set to svg
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