docker run -it -v "$PWD":/app -w /app node:15-buster yarn install
docker run -it --network db -p 3333:3333 -e PGHOST=db -e PGDATABASE=pnwho -e PGUSER=pnwho -e PGPASSWORD=securesecure -v "$PWD":/app -w /app node:15-buster npx nodemon src/api.js
docker run -it --network db -e PGHOST=db -e PGDATABASE=pnwho -e PGUSER=pnwho -e PGPASSWORD=securesecure -v "$PWD":/app -w /app node:15-buster node src/ingest.js
docker run -it --network db -e PGHOST=db -e PGDATABASE=pnwho -e PGUSER=pnwho -e PGPASSWORD=securesecure -v "$PWD":/app -w /app node:15-buster npx nodemon src/ingest.js
docker compose run ingest -- src/userdb.js
docker run -it --network db -e PGHOST=db -e PGDATABASE=pnwho -e PGUSER=pnwho -e PGPASSWORD=securesecure -v "$PWD":/app -w /app node:15-buster /bin/bash
This query fetches the full history of dmr numbers that have had modifications in the last day.
It specifically excludes new DMR numbers.
SELECT * FROM dmrid_history
WHERE radio_id IN
(
SELECT radio_id FROM dmrid_history
WHERE radio_id IN
(
SELECT radio_id FROM dmrid_history
GROUP BY radio_id
HAVING COUNT(*) > 1
) AND updated_ts >= (NOW() - interval '1 day')
)
ORDER BY radio_id, id ASC;