From a8e6dc0b095ea4d6eecd51ecfe5c72ec0330bd67 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Tue, 29 Mar 2022 16:55:40 +0100 Subject: [PATCH] add new header on db creation --- docs/setup-dev-environment.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/setup-dev-environment.md b/docs/setup-dev-environment.md index b44972f3..719fd26c 100644 --- a/docs/setup-dev-environment.md +++ b/docs/setup-dev-environment.md @@ -49,6 +49,7 @@ ssh @localhost -p 4022 - [:rainbow: Installing Colouring London](#rainbow-installing-colouring-london) - [:arrow_down: Installing Node.js](#arrow_down-installing-nodejs) - [:large_blue_circle: Configuring PostgreSQL](#large_blue_circle-configuring-postgresql) + - [:space_invader: Create an empty database](#space_invader_create_an_empty_database) - [:arrow_forward: Configuring Node.js](#arrow_forward-configuring-nodejs) - [:snake: Set up Python](#snake-set-up-python) - [:house: Loading the building data](#house-loading-the-building-data) @@ -190,6 +191,10 @@ If you intend to load the full CL database from a dump file into your dev enviro

+### :space_invader: Create an empty database + +Now create an empty database configured with geo-spatial tools. The database name (``) is arbitrary. + Set environment variables, which will simplify running subsequent `psql` commands. ```bash @@ -199,7 +204,7 @@ export PGHOST=localhost export PGDATABASE= ``` -Create a colouring london database if none exists. The name (``) is arbitrary. +Create the database. ```bash sudo -u postgres psql -c "SELECT 1 FROM pg_database WHERE datname = '';" | grep -q 1 || sudo -u postgres createdb -E UTF8 -T template0 --locale=en_US.utf8 -O