Installation ===================================== Docker Image ------------ The latest `Docker `_ image of SchemaSpy can be downloaded using `docker pull schemaspy/schemaspy`. Docker documentation and run commands can be found on the `SchemaSpy Docker Hub page `_. Application ------------- Prerequisites ~~~~~~~~~~~~~ Before you can use SchemaSpy you must have the following prerequisites available on your local system. * Java * a JDBC driver file for your specific database engine * viz.js or Graphviz Java ^^^^ You will need to have a supported version of Java installed, which is 17 or higher. You can run ``java -version`` in a terminal to check the version of any currently installed Java. If you don't already have a proper version of Java installed, see `Adoptium `_ or `Oracle Java `_ for download and install instructions for your operating systems. viz.js or Graphviz ^^^^^^^^^^^^^^^^^^ This is necessary to render graphical representations / images of the database relationships. SchemaSpy version 6.1.0 and higher now comes with viz.js, so you will not need to download anything unless you're using SchemaSpy version 6.0 or lower. For SchemaSpy version 6.1.0 or higher, simply include ``-vizjs`` as a command line argument when executing the SchemaSpy command. If you must use Schemaspy version 6.0 or less, then Graphviz will need to be installed as follows. - Windows The easiest way to install Graphviz is to download the msi package from `http://www.graphviz.org/download/ `_ .. warning:: Remember to add the folder containing Graphviz's dot.exe application to your system PATH variable, eg. .. code-block:: bash C:\Program Files (x86)\Graphviz2.38\bin - Linux, Mac OS Please read carefully the detailed instructions on how to `install Graphviz on your operating system `_. Download SchemaSpy Executable .jar File ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Download the latest stable executable .jar file (ex. schemaspy-[version].jar) from the `SchemaSpy website `_ or `GitHub releases page `_. For special cases, like testing a recent `bug fix or feature `_, we also make a `bleeding-edge build file `_ available. The bleeding-edge build may not be stable and should only be used for testing. Proceed to the :ref:`get-started` section to learn how to configure and run the downloaded SchemaSpy executable. JDBC Driver ----------- No JDBC drivers are included with the jar-distribution of SchemaSpy, docker image contains MySQL, MariaDB, PgSQL, jTDS for MSSQL. In some cases, a JDBC driver may already exist on your local system if your database happens to come with drivers. Otherwise, you will need to download one yourself. If downloading a driver, you can usually find an appropriate driver by searching the internet for "[name of your database] JDBC driver". Verify the driver you download is compatible with the version of database management system / engine that you are using. For instance, if you're using PostgreSQL 13 the JDBC driver will need to support PostgreSQL 13. Here is a list of where you might find drivers for common database management systems: * `DB2 `_ * `Firebird `_ * `Impala `_ * `MySQL `_ * `MariaDB `_ * `Netezza `_ * `Oracle `_ * `PostgreSQL `_ * `Redshift `_ * `SQLite `_ * `SQL Server `_ * `Sybase `_ * `Teradata `_ You will need to tell SchemaSpy where to find the JDBC driver you require. For example, if you downloaded the Postgres JDBC file called postgresql-42.2.19.jar to the current directory the command would include the -dp argument, like ``-dp postgresql-42.2.19.jar``. If your JDBC .jar file is in a different directory, then the -dp argument would need to specify the directory path to the file, like ``-dp /opt/some-directory/your-jdbc-driver-name.jar``. See :ref:`commandline` for more information and advanced situations. To add driver when using docker is documented at `SchemaSpy Docker Hub page `_.