doc(services-insert): extend readme.md
This commit is contained in:
parent
88f9123323
commit
15663adc42
|
@ -4,7 +4,7 @@ insert data into PostgreSQL services table
|
|||
|
||||
Requirements:
|
||||
|
||||
* Node.js <=18.13.0
|
||||
* Node.js
|
||||
* PostgreSQL database
|
||||
* Check [dependencies](./package.json)
|
||||
|
||||
|
@ -24,6 +24,11 @@ npm i
|
|||
DEBUG=debug npm run dev
|
||||
```
|
||||
|
||||
* run with all debug output
|
||||
```
|
||||
DEBUG=* npm run dev
|
||||
```
|
||||
|
||||
## Production setup
|
||||
|
||||
* run the following instruction to start the service in production mode
|
||||
|
|
|
@ -7,3 +7,4 @@ SET search_path to :schema, public;
|
|||
DROP VIEW IF EXISTS :schema.vw_join_gncy_rts_trps_stptms CASCADE;
|
||||
--CREATE OR REPLACE VIEW :schema.vw_join_gncy_rts_trps_stptms AS SELECT gncy_rts_trps.agency_id, gncy_rts_trps.agency_name, gncy_rts_trps.route_id, gncy_rts_trps.route_short_name, gncy_rts_trps.service_id, gncy_rts_trps.trip_id, gncy_rts_trps.trip_short_name, gncy_rts_trps.trip_headsign, stptms.stop_id FROM :schema.vw_join_gncy_rts_trps AS gncy_rts_trps RIGHT JOIN :schema.stop_times AS stptms ON gncy_rts_trps.trip_id = stptms.trip_id ORDER BY gncy_rts_trps.agency_name, gncy_rts_trps.route_id, gncy_rts_trps.trip_id;
|
||||
CREATE OR REPLACE VIEW :schema.vw_join_gncy_rts_trps_stptms AS SELECT gncy_rts_trps.agency_id, gncy_rts_trps.agency_name, stptms.stop_id FROM :schema.vw_join_gncy_rts_trps AS gncy_rts_trps JOIN :schema.stop_times AS stptms ON gncy_rts_trps.trip_id = stptms.trip_id GROUP BY stptms.stop_id, gncy_rts_trps.agency_id, gncy_rts_trps.agency_name ORDER BY gncy_rts_trps.agency_name;
|
||||
--TODO JOIN or LEFT JOIN?
|
||||
|
|
Loading…
Reference in New Issue