/firefly-database

PostgreSQL extension to simplify the installation of Firefly database

Primary LanguagePLpgSQLGNU General Public License v3.0GPL-3.0

Quality Build & deploy License
Codacy Badge CircleCI License: GPL v3

firefly-database

PostgreSQL extension to simplify the installation of Firefly database.

Installation

Install postgresql

# Install postgresql
sudo apt-get install postgresql-9.6 postgresql-server-dev-9.6

Install postgis:
See firefly-database-base Dockerfile

Install firefly database extension:

# Install firefly database extension
sudo make install

Check installation

ll /usr/share/postgresql/9.6/extension/firefly*
-rw-r--r-- 1 root root 6529 janv. 28 14:49 /usr/share/postgresql/9.6/extension/firefly--0.0.1.sql
-rw-r--r-- 1 root root  163 janv. 28 14:49 /usr/share/postgresql/9.6/extension/firefly.control

Run tests

# Install pgtap
git clone git@github.com:theory/pgtap.git
cd pgtap
sudo make install

# Into firefly-database folder : Run unit tests with postgres user
sudo chown -R postgres `pwd`
sudo -u postgres make installcheck  

Use

In your sql script, you just have to put this line to have all necessary tables and functions.
This will install extension firefly and its dependencies extensions into your database.

CREATE EXTENSION firefly CASCADE;

Update version procedure

  • Update the firefly--VERSION.sql file name.
  • Update the default_version field from firefly.control file.
  • Update the DATA variable from Makefile file.
  • Update the jobs.build.environment.VERSION field from .circleci/config.yml file.
  • Tag the version.