Skip to content

Create PostgreSQL database

Grégoire Détrez edited this page Feb 27, 2018 · 1 revision

Here's how to initialize the database for scan-o-matic. It is assumed that you have installed PostgreSQL and can run the following commands as the postgres superuser (usually called postgres).

Set-up

Names for the (postgres) user that will be used by Scan-o-matic and the database.

username=scanomatic
database=scanomatic

Create postgres user with a password

$ createuser --encrypted --pwprompt $username

Create database

$ createdb $database

Grant privileges on database

$ psql -c "grant all privileges on database $database to $username ;"

PostgreSQL extensions

$ psql --dbname $database -c "CREATE EXTENSION btree_gist;"

Clone this wiki locally