How to create database schema manually

Still need help?

The Atlassian Community is here for you.

Ask the community

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

  1. Install Confluence with no external database.
  2. Shut down Confluence
  3. Find the file located in <confluence-home>/database/confluencedb.script
    1. The confluence-home directory is not your installation directory. Rather, it's the directory specified in confluence-init.properties. For more information, see Confluence Home and other important directories and Confluence Installation Directory.

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.urlusername 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.

RELATED TOPICS

Database Configuration

Last modified on Feb 26, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.