{"id":24116983,"url":"https://github.com/questionlp/wwdtm_database_backport","last_synced_at":"2026-04-07T20:31:33.054Z","repository":{"id":271666964,"uuid":"914166710","full_name":"questionlp/wwdtm_database_backport","owner":"questionlp","description":"Backport the Wait Wait Stats Database data to a previous version of the database","archived":false,"fork":false,"pushed_at":"2025-01-09T06:02:27.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T19:01:27.343Z","etag":null,"topics":["database","mariadb","mysql","wwdtm"],"latest_commit_sha":null,"homepage":"https://stats.wwdt.me","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/questionlp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-09T04:25:19.000Z","updated_at":"2025-01-09T06:02:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"2aa66fa5-cd45-4fe1-900e-57717d74d5af","html_url":"https://github.com/questionlp/wwdtm_database_backport","commit_stats":null,"previous_names":["questionlp/wwdtm_database_backport"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/questionlp/wwdtm_database_backport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questionlp%2Fwwdtm_database_backport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questionlp%2Fwwdtm_database_backport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questionlp%2Fwwdtm_database_backport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questionlp%2Fwwdtm_database_backport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/questionlp","download_url":"https://codeload.github.com/questionlp/wwdtm_database_backport/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/questionlp%2Fwwdtm_database_backport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","mariadb","mysql","wwdtm"],"created_at":"2025-01-11T07:23:03.040Z","updated_at":"2026-04-07T20:31:33.038Z","avatar_url":"https://github.com/questionlp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wait Wait Stats Database Backport\n\nThis Python application pulls data from a copy of the [Wait Wait Stats Database](https://github.com/questionlp/wwdtm_database) based version 4.x, processes and imports the data into a freshly initiated instance of a Wait Wait Stats Database based on version 3.\n\nBy backporting the data to a previous version of the Stats Database, earlier versions of the [Wait Wait Stats Page](https://stats.wwdt.me/) application could be used with recent data.\n\n## Background Information\n\nPrior to version 4.1, the Wait Wait Stats Database used the `utf8` MySQL/MariaDB character set, which was an alias for `utf8mb3` and not `utf8mb4` as one would have assumed. This creates an issue with the inability to store characters that require 4 bytes per code point.\n\nThis wasn't an initial issue when the Stats Page was written for PHP 5 and 6, due to the middling or complete lack of proper Unicode support. When the application was re-written for Python 3, the database had to be updated to use the `utf8mb4` character set. While this doesn't completely break older versions of the Stats Page, it did lead to issues of accented and compound characters to either cause the PHP-based application to error out or not render out strings containing such characters.\n\nWhen the application encounters a string or text field, it will run `unicodedata.normalize` against the string and reduce accented characters and compound characters to the base ASCII representation as part of its processing. This prevents issues with PHP incorrectly rendering strings or omitting them completely.\n\n## Usage\n\nIn order to use this application, you will need a copy of the Wait Wait Stats Database based on version 4.2 or later running on MySQL 8 or newer and an instance of MySQL 5.6 or MariaDB 10 or newer as a destination. Older versions of the Wait Wait Stats Page application **do not** support versions of MySQL higher than 5.6 due to multiple breaking changes implemented in newer versions.\n\nOn the destination database server, create a clean database and run the [wwdtm.initial.sql](https://github.com/questionlp/wwdtm_database/blob/main/v3/wwdtm.initial.sql) database intialization script for Wait Wait Stats Database version 3. You will have to modify the script to replace instances of ``lpham`@`%`` in the view definitions with a user with the appropriate privileges to create databases, tables and views.\n\nOnce the database has been created and initialized, clone this repository, set up a virtual environment, install the dependencies from `requirements.txt`.\n\nNext, make a copy of the included `config.dist.json` file and name the copy `config.json` and fill in the required database connection information for both the source and destination databases.\n\nWhen the above steps have been completed, the application can be run using the following command:\n\n```bash\npython3 backport.py\n```\n\n## Contributing\n\nIf you would like contribute to this project, please make sure to review the [Code of Conduct](CODE_OF_CONDUCT.md) included in this repository.\n\n## License\n\nThis application is licensed under the terms of the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquestionlp%2Fwwdtm_database_backport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquestionlp%2Fwwdtm_database_backport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquestionlp%2Fwwdtm_database_backport/lists"}