-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 (db) add chart_configs table / TAS-563 (#3767)
## Summary Adds a `chart_configs` table to the database, adds a `configId` column to the `charts` table that points to a `chart_configs` row, and removes the `config` column. Shouldn't result in any functionality change. ## Details - All configs are copied from the `charts` table to the `chart_configs` table (for now, `patch config = full config` since inheritance hasn't been implemented yet) - Configs have a UUID, but it's not yet used (the id of the chart is still the sequential primary key of the charts table) ## Testing - [x] Bakes locally - [x] Bakes staging site Site: - [x] http://staging-site-db-chart-configs/ - [x] http://staging-site-db-chart-configs/grapher/life-expectancy - [x] http://staging-site-db-chart-configs/explorers/coronavirus-data-explorer - [x] http://staging-site-db-chart-configs/explorers/democracy - [x] http://staging-site-db-chart-configs/explorers/conflict-data - [x] http://staging-site-db-chart-configs/poverty - [x] http://staging-site-db-chart-configs/financing-education - [x] http://staging-site-db-chart-configs/part-two-how-many-people-die-from-extreme-temperatures-and-how-could-this-change-in-the-future - [x] http://staging-site-db-chart-configs/covid-hospitalizations - [x] http://staging-site-db-chart-configs/country/germany - [x] http://staging-site-db-chart-configs/energy/country/india - [x] http://staging-site-db-chart-configs/data-insights - [x] http://staging-site-db-chart-configs/collection/top-charts - [x] http://staging-site-db-chart-configs/sdgs - [x] http://staging-site-db-chart-configs/sdgs/no-poverty Admin: - [x] Chart editor: - [x] Create new chart - [x] Save as new chart - [x] Update existing chart - [x] Publish chart - [x] Unpublish chart - [x] Delete chart - [x] Bulk chart editor - [x] Chart test page - [x] Variable page (chart list) ## On the ETL side Mojmir opened a PR for changes to the ETL: owid/etl#2957 ## To do - [x] ~Is it safe to rewrite the config's id?~ I think it's okay - [x] I don't understand why we manually insert `createdAt` and `updatedAt` since the db inserts values on insert/update? - [x] Checklist for updating the db: https://www.notion.so/owid/Database-access-in-Grapher-d9db343c2bfb4ae0b14b3dec72f686c6?pvs=4#dd5b51bab6f84630839f4173b59feba2 - [x] Let Mojmir know so that he can update the ETL db schema (wait for the table structure to be signed off on) ## To do after merging - [ ] ETL: owid/etl#2957 - [ ] Datasette: owid/analytics#138 - [ ] Schema validation: owid/automation#12
- Loading branch information
1 parent
1f3c2d9
commit 6c3057a
Showing
24 changed files
with
776 additions
and
360 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.