dbDoc <outputDirectory> command

The dbDoc <outputDirectory> command generates documentation in a Javadoc format based on the existing database and changelogs.

Uses

The dbDoc <outputDirectory> command is typically used to generate database documentation with the change information stored in the changelogs and the existing database. It captures the current state of your database including everything that has been performed against it.

The image below shows an example of the database documentation structure with the related directories and files.

Running the dbDoc <outputDirectory> command

To run the dbDoc <outputDirectory> command, you need to specify your driver, class path, URL, and user authentication information in your liquibase.properties file. For more information, see Creating and configuring a liquibase.properties file. You can also specify these properties in your command line.

Then run the dbDoc <outputDirectory> command:

liquibase --changeLogFile=myChangelog.xml dbDoc changelogDocs

Note: Enter the name of the changelog and the output directory that you want to use in place of myChangelog.xml and changelogDocs. Also, it is best practice to specify a new empty directory for the files path because the dbDoc <outputDirectory> command creates its own directories, the CSS file, and multiple .html files.

dbDoc <outputDirectory> global attributes

Attribute Definition Requirement

--changeLogFile

The root changelog

Required

--url

The JDBC database connection URL

Required

--username

The database username

Required

--password

The database password

Required

dbDoc <outputDirectory> command attributes

Attribute Definition Requirement

<outputDirectory>

The directory where the database documentation is generated.

Required