Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



Database Setup

Note: The current schema is out of date; updated instructions will be available soon.

Download the schema from the CI server


Database initialization can be done through the flyway-maven-plugin provided that you have a PostgresQL database which you can connect to and create/drop tables for. The flyway plugin will create load the first version of the schema and baseline the database at 1.0 so that all migrations can be applied. This requires the chronopolis-core repository to be cloned so that the flyway plugin can be run.

To run the flyway plugin, cd into the ingest-rest directory and use flyway:baseline and provide configuration for the flyway.user, flyway.password, and flyway.url configuration parameters. Once the database is baselined, the ingest server can be started and will apply all migrations.

Code Block
titleExample PostgresSQL Setup
psql (8.4.20)
Type "help" for help.
postgres=# CREATE USER chron WITH PASSWORD 'secret-password';
postgres=# CREATE DATABASE ingest;
postgres=# GRANT ALL PRIVILEGES ON DATABASE ingest to chron;
postgres=# \c ingest;
psql (8.4.20)
You are now connected to database "ingest".
ingest=# SET ROLE chron;
ingest=> \i /tmp/schema_pg.sql[chronopolis-core] $ cd ingest-rest
[chronopolis-core/ingest-rest] $ ../mvnw -Dflyway.user=postgres -Dflyway.password=mysecretpassword -Dflyway.url=jdbc:postgresql:// flyway:baseline

Preparing the DB for Schema Migrations