How to create database schema manually
Purpose
Often, DBAs will require that table creation be done manually. To find the required SQL statements, you can use the script generated from our evaluation version's HSQLDB database.
Solution
Please note this only applies up to Confluence 5.7.5. Confluence 5.8 uses the H2 database for evaluation
- Install Confluence with no external database.
- Shut down Confluence
- Find the file located in
<confluence-home>/database/confluencedb.script
- The
confluence-home
directory is not your installation directory. Rather, it's the directory specified inconfluence-init.properties
. For more information, see Confluence Home and other important directories and Confluence Installation Directory.
- The
To see some example SQL statements, click Tools and select Attachments on this page.
The example SQL statements are from Confluence version 2.7, and are provided for instructional purposes only.
To get Confluence to run against this established schema, configure the database with the normal procedure, then modify the hibernate.connection.url, username and password properties from <confluence-home>/confluence.cfg.xml
or <confluence-installation-directory>/conf/server.xml
, depending on whether it's a direct JDBC or datasource connection. This is described in Migrating Confluence Between Servers.