Postgres Database Setup

There are two ways to create the Postgres database:

  • Eventide Command Line
  • Raw SQL Scripts

Eventide Command Line

The eventide-postgres gem includes a handful of handy command line tools for working with the event storage database.

The evt-pg-create-db command creates the Postgres event source database.

Settings File

Using the Eventide command line tools requires that a settings file named event_source_postgres.json exists in a directory named settings

|- settings
  |- event_source_postgres.json

The settings file contains information about the Postgres connection.

For example:

  "dbname": "event_source",
  "host": "localhost",
  "hostaddr": "",
  "port": 5432,
  "user": "event_source"

For more information on the settings file for the Postgres event source, see: Postgres Settings in the user guide.

Creating the Postgres Event Storage Database

To create the Postgres database, run from a terminal:

bundle exec evt-pg-create-db

Raw Database Scripts

The eventide-postgres repository includes scripts for creating the PostgreSQL database.

The scripts are part of the event-source-postgres library. You can review them on GitHub or clone the repository and review the scripts from your editor.

View the database scripts on GitHub:

Download the Code

Clone the repository and change to the event-source-postgres directory:

git clone
cd event-source-postgres

The scripts are in the database subdirectory.

cd database

Database Details

The database scripts will create the following:

results matching ""

    No results matching ""