SchemaCrawler - Lint Example
Description
SchemaCrawler looks for potential database design issues. Follow the steps below to run SchemaCrawler Lint.
How to Setup
- Make sure that java is on your PATH
- Start a command shell in the
_downloaderdirectory - Run
download.cmd jackson(ordownload.sh jacksonon Unix) to install support for JSON and YAML reports
How to Run
- Follow the instructions in the commandline example
- To find schema design issues, run
schemacrawler.cmd --server=hsqldb --database=schemacrawler --password= --info-level=standard --command=lint(useschemacrawler.shinstead ofschemacrawler.cmdon Unix)
How to Experiment
- See help on all of the available lints, run
schemacrawler.cmd lint --help(useschemacrawler.shinstead ofschemacrawler.cmdon Unix) - Create the SchemaCrawler Lint report in HTML5 format.
- Create the SchemaCrawler Lint report in JSON or YAML format, using an additional
-F jsonor-F yaml. - Create a customized SchemaCrawler Lint report using a linter configuration file.
- Copy the
schemacrawler-linter-configs.yamlfile to the SchemaCrawler distribution directory, that is, the_schemacrawlerdirectory. - To find schema design issues, run with an additional command-line option,
--linter-configs=schemacrawler-linter-configs.yaml - Try creating your own database lints in a new jar - see SchemaCrawler Lint.
- Generate lint reports in JSON format. First download Jackson using instructions in the
serializeexample. Then run,schemacrawler.cmd --server=hsqldb --database=schemacrawler --password= --info-level=standard --command=lint,serialize --output-format=json(useschemacrawler.shinstead ofschemacrawler.cmdon Unix)