From ee613e8a3a41454e22f84127b9c0042a5f7a9589 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 23 Feb 2022 12:31:06 +0000 Subject: [PATCH] remove -U and -h flags, export vars instead --- docs/setup-dev-environment.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/setup-dev-environment.md b/docs/setup-dev-environment.md index d7988439..13bada83 100644 --- a/docs/setup-dev-environment.md +++ b/docs/setup-dev-environment.md @@ -166,6 +166,8 @@ Set the `` as an environment variable. ```bash export PGPASSWORD= +export PGUSER= +export PGHOST=localhost ``` Create a colouring london database if none exists. The name (``) is arbitrary. @@ -177,7 +179,7 @@ sudo -u postgres psql -c "SELECT 1 FROM pg_database WHERE datname = ' -U -h localhost +psql -d ``` In `psql`, necessary postgres extensions. @@ -230,7 +232,7 @@ You should then download the file to the machine where you are setting up your d In your Ubuntu installation where you have been running these setup steps (e.g. Virtualbox VM), you can then recrate the db like so. ```bash -psql -d -U -h localhost < +psql -d < ``` @@ -288,7 +290,7 @@ To help test the Colouring London application, `get_test_polygons.py` will attem First open `colouring-london/etl/load_geometries.sh` and `colouring-london/etl/create_building_records.sh` and add this `-d` flag to all the `psql` statements present (two in the former, one in the latter): ```bash --d -U -h localhost +-d ``` Download the test data. @@ -322,7 +324,7 @@ Now run all 'up' migrations to create tables, data types, indexes etc. The `.sql do this are located in the `migrations` folder of your local repository. ```bash -ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d -U -h localhost < $migration; done; +ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d < $migration; done; ``` ## Running the application