We dump the DB schema from a running MW instance and give it to the Platform API so it can keep a handful of DB preconfigured for when a new Wiki is created. Each time we do a MW update, we have to run a new MW instance and dump the DB schema again.
Docs on how this is currently done: https://github.com/wbstack/api/tree/main/database/mw
This is a bit backwards given that MW already knows the DB schema and can create new DB instances. Investigate moving the creation of the database into MediaWiki will make upgrades simpler and reduce the number of repos need modifying. Figure out what the process would be:
- would this involve firing off k8s jobs?
- would this involve calling a backend api on MW?
- if how how would this handle the fact the wiki doesn't exist already? Could this help: https://github.com/wbstack/mediawiki/blob/64a8388399be89601c41b571e29fec1d1b179096/dist-persist/wbstack/src/Info/GlobalSet.php#L42
A/C:
- summarise how this would work in text or create a PoC patchset
Initial Timebox: 16 hours
Remaining Time: 0 hours