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.
- PostgreSQL server 9.4 or higher
- PHP 5.5 or higher
- php-pgsql module
- 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.sampletoconfig.inc.php config.sh.sampletoconfig.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./vendor/bin/phpunit --stop-on-error src/./scripts/import.php /path/to/arrangement/directory