Skip to content

actimeo/simmage-backend

Repository files navigation

Build Status

simmage-backend

Variation v2 (SIMMAGE project) postgreSQL backend.

The backend is composed of a PostgreSQL database, divided in several schemas, and PL/PgSQL procedures.

For a normal usage, the database should not be accessed directly with SQL requests, but PL/PgSQL procedures should be used.

The PgProcedures (https://github.com/actimeo/pgproc) PHP module can be used to access PL/PgSQL procedures from PHP.

Prerequisites:

  • PostgreSQL server 9.4 or higher
  • PHP 5.5 or higher
  • php-pgsql module

Install

  • get sources from github:
$ git clone https://github.com/actimeo/simmage-backend.git
$ cd simmage-backend
  • Install necessary PHP modules
$ composer install
  • In your favorite PostgreSQL server, create a new connection role
postgres$ psql
postgres=# create user simmage password 'apassword';
  • copy config.inc.php.sample to config.inc.php
  • config.sh.sample to config.sh
  • edit these 2 files with your database information. CAUTION: Provide a database name which does not exist on your server, or it will be erased!
  • run the following script, as postgres user:
$ sudo su postgres -c ./scripts/update.sh

Run tests

./vendor/bin/phpunit --stop-on-error src/

Import arrangement

./scripts/import.php /path/to/arrangement/directory

About

Variation v2 (SIMMAGE project) postgreSQL backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published