List of schools updated - Pardhu448/clix_dashboard_backend GitHub Wiki

To get latest list all schools updated into backed DB

Following are the steps to get the latest list of schools updated. We get unique schools from attendance(metric1) table of backend DB. We have to do this from inside a docker image for postgres database which we are using for our backend. 0. Login into the server and move to folder 'CLIxDashboard'

  1. run 'docker exec -it clix_dashboard_postgres /bin/bash'
  2. run 'psql -d clix_dashboard_db -U admin_clixdata'
  3. Once we are in db, run '\copy (SELECT DISTINCT school_server_code from metric1) TO '/home/school_ids.csv' WITH CSV';
  4. run '\q' to come out of postgres docker
  5. on te host machine run 'docker cp clix_dashboard_postgres:/home/school_ids.csv .'