PMA-2020 / pma-api

The best way to programmatically access PMA2020 data.
http://api.pma2020.org
MIT License
1 stars 3 forks source link

Add to docs - postgres setup #43

Open joeflack4 opened 6 years ago

joeflack4 commented 6 years ago

Description

1. Update docs to erase sqlite stuff

2. Remove sqlite stuff from the codebase as well

3. Update docs to include postgres setup

env var: postgresql+psycopg2://pmaapi:pmaapi@localhost/pmaapi

creating a database

  1. step 1 - load psql type: psql
  2. Step 1 - create db
    • Create - CREATE DATABASE <db>; (edited)

literal command: CREATE DATABASE pmaapi; (edited)

  1. make username and pw syntax:
    • Create - CREATE USER <user>;
    • Make PW - ALTER USER <user> WITH PASSWORD '<pw>'; (edited) example: CREATE USER pmaapi; ALTER USER <user> WITH PASSWORD 'pmaapi';

Joe Flack [2:14 PM]

  1. give the user access to the database:
    • Grant Permissions - GRANT ALL PRIVILEGES ON DATABASE <db> TO <user>; example: GRANT ALL PRIVILEGES ON DATABASE pmaapi TO pmaapi;