Skip to content

Conversation

@krivard
Copy link
Contributor

@krivard krivard commented Oct 20, 2021

closes #720

Prerequisites:

  • Unless it is a documentation hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

Summary

State:

  • Add new columns to covid_hosp_state_timeseries table with SQL-compatible name length and spelling
  • Add database migration helper
  • Add corresponding entries to database.py for state daily and state timeseries acquisition pipelines
  • Add corresponding entries to covid_hosp_state_timeseries.py server endpoint

Facility:

  • Add new columns to covid_hosp_facility table with SQL-compatible name length and spelling
  • Add database migration helper
  • Add corresponding entries to database.py for facility acquisition pipeline
  • Add corresponding entries to covid_hosp_facility.py server endpoint

Unit and integration tests updated with new constants and sample data.

@krivard krivard marked this pull request as ready for review October 20, 2021 19:54
@krivard krivard requested a review from chinandrew October 20, 2021 19:54
@krivard krivard requested a review from chinandrew October 21, 2021 14:19
@chinandrew
Copy link
Contributor

:shipit::shipit::shipit: will probably want to run migration scripts on staging or some test environment first

chinandrew
chinandrew previously approved these changes Oct 21, 2021
Copy link
Contributor

@chinandrew chinandrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: :shipit: :shipit:

Copy link
Contributor Author

@krivard krivard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edits from migration testing

@krivard
Copy link
Contributor Author

krivard commented Oct 21, 2021

Also confirmed all the column names match what we're using in covid_hosp.sql

$ sed '1d; s/.;//' src/ddl/migrations/covid_hosp_facility_v0.2-v0.3.sql |while read x; do echo $x; grep "$x" src/ddl/covid_hosp.sql && echo "yes" || echo "error"; done |grep -B3 error
$ sed '1d; s/.;//' src/ddl/migrations/covid_hosp_state_v0.2-v0.3.sql |while read x; do echo $x; grep "$x" src/ddl/covid_hosp.sql && echo "yes" || echo "error"; done |grep -B3 error
$

@krivard krivard merged commit 5035cf6 into dev Oct 21, 2021
@krivard krivard deleted the krivard/covid_hosp_column_update branch October 21, 2021 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update available columns in covid_hosp datasets

3 participants