Some additional lints for Schemacrawler
The main purpose of this lint library is to enhance native schemacrawler lints with some more hardcore constraints and some specific postgres types. That's why a postgreSQL database instance is required to test.
This project has been created to be used at our office Mairie de la Ville de Nouméa to test our database schema quality in a more easy way and make it possible for our partners to apply our database quality policy the easy way.
Notice that this version is designed to run on schemacrawler 14.x.x
...
and hence is requiring JDK-1.8 to be built and run.
For now the jar is not available on maven central repo, so you'll have to build it yourself :
git clone https://github.com/mbarre/schemacrawler-additional-lints.git schemacrawler-additional-lints
cd schemacrawler-additional-lints
export LINT_VERSION=1.02.02
Build without testing as a local postgres install is required to test.
mvn install -Dmaven.test.skip=true
cp target/schemacrawler-additional-lints-${LINT_VERSION}.jar $SCHEMACRAWLER_HOME/lib
... and you're done, you just have to pass your normal schemacrawler lint command and enjoy.
To be able to test locally, assuming you have a locally postgreSQL instance
up and running with the proper superuser
account, then run the following
commands
dropdb --if-exists sc_lint_test
createdb sc_lint_test
mvn install
cp target/schemacrawler-additional-lints-${LINT_VERSION}.jar $SCHEMACRAWLER_HOME/lib
Or, install Docker Compose to deploy PostgreSQL and the database
docker-compose -f docker/postgresql.yml up
mvn install
cp target/schemacrawler-additional-lints-${LINT_VERSION}.jar $SCHEMACRAWLER_HOME/lib
Check that dependencies are up-to-date :
mvn versions:display-dependency-updates
Check that plugins are up-to-date :
mvn versions:display-plugin-updates
schemacrawler -server=postgresql -host=localhost -port=5432 -database=pdc -user=pdc_adm -password=pdc_adm -infolevel=maximum -schemas=pdc_adm -loglevel=INFO -c=lint --outputfile=lint_pdc.html -outputformat=html
If you like this lint library, you can donate :
- Stars on github
- Ideas for new lints
- Code for new lints
- Code to increase code coverage
- Create issue
- A nice logo
- Feebdack on this library
- Anything you think that could make us happy to go on developing this library, including just some kind words on our gitter
To Jetbrains for offering an IntelliJ IDEA Free Open Source License to this project contributors.