revise data loading section

This commit is contained in:
Ed Chalstrey 2022-02-17 11:16:37 +00:00
parent a89401eefe
commit 7f173d6c4f

View File

@ -157,7 +157,18 @@ local repository, so that it can read from the `package.json` file.
`cd ./colouring-london/app && npm install` `cd ./colouring-london/app && npm install`
## Including test data ## Loading the data
<details>
<summary>
With a database dump
</summary>
</details>
<details>
<summary>
With test data
</summary>
Run the following two sections if you wish to load test buildings into the application from OpenStreetMaps (OSM). Run the following two sections if you wish to load test buildings into the application from OpenStreetMaps (OSM).
@ -220,12 +231,12 @@ psql -d <colouringlondondb> < ../migrations/002.index-geometries.up.sql
psql -d <colouringlondondb> < ../migrations/003.index-buildings.up.sql psql -d <colouringlondondb> < ../migrations/003.index-buildings.up.sql
``` ```
## Run database migrations #### Re-run database migrations
Re-run the remaining migrations in `../migrations` to create the rest of the database structure. Re-run the remaining migrations in `../migrations` to create the rest of the database structure.
`ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d <colouringlondondb> < $migration; done;` `ls ./colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d <colouringlondondb> < $migration; done;`
</details>
## Running the application ## Running the application