As a Wikibase developer, I want the schema and schema change files in Wikibase to be in a consistent and easy-to-maintain format, so that I can trust the schema changes are consistent across different database backends, and I can easily add additional schema changes.
Problem:
While abstract schemas have made it much easier to generate the SQL table and patch files, the process of actually running the scripts to generate those files is, as far as I’m aware, manual. This can introduce variations in the schema files, or files can even be missed entirely.
Example:
- variations in schema files: a few patches start with Source: repo/sql/… instead of Source: extensions/Wikibase/repo/sql/ because the script was run in a different directory; fixed in I81dbb5fd4c
- missing files: I6dcdee20f5 did not add an sqlite patch
Acceptance criteria:
- There is a single command that developers can run to regenerate all SQL files based on the JSON files.
- We regularly re-run this command to check if there are any changes from the committed SQL files (e.g. due to updates to the MediaWiki core code or underlying library generating the SQL)
Open questions: