Once the database review (T318593) is completed, we would like that the extension tables be created in production.
Partial checklist (from mw:Creating_new_tables)
- Create a Phabricator task to track the table creation - you're reading it now
- Design the table schema
- Write the gerrit patch and get it merged - done for several patches in the last 9 months or so
- Request DBA signoff T318593: Review database schema of the CampaignEvents extension
- Move the task to the Triage column on the DBA workboard.
- Modify createExtensionTables.php to include extension and tables you need to use. -- Not needed, see T318595#8352927.
- Add tables to addWiki.php - unsure if this one is relevant given where the tables will be, see below. -- Not needed, see T318595#8352927.
Details
- Should this table be replicated to wiki replicas (does it not contain private data)?
- There's more than one table with different rules. See P35370
- Will you be doing cross-joins with the wiki metadata?
- If I understood the question correctly, no.
- Expected amount of queries, both writes and reads (per minute, per hour...per day, any of those are ok).
- See P35379 for some estimates.
- Size of the table (number of rows expected).
- Initially 0, then it grows as detailed below.
- Expected growth per year (number of rows).
- Using the same (over)estimates as P35379, we could say:
- campaign_events: 500 * 1 * 12 = 6000
- ce_address: 500 * 0.5 * 12 = 3000
- ce_event_address: 500 * 0.5 * 12 = 3000
- ce_organizers: 500 * 5 * 12 = 30000
- ce_participants: 500 * 300 * 12 = 1800000
- Using the same (over)estimates as P35379, we could say:
- Examples of queries that will be using the table.
- See T308738#8085151 for a description of the schema and some example queries (could be slightly outdated)
- The release plan for the feature (are there specific wikis you'd like to test first etc).
- For now, we are requesting that the schema be created on testwiki, test2wiki, and officewiki
Auto-generated mysql file (master version)
Deployment
- Make sure the patch which introduces the tables got merged, and confirm files were deployed to production -- done by @Daimona
- Schedule table creation at a time that doesn't conflict with the deployment schedule -- done: https://wikitech.wikimedia.org/w/index.php?title=Deployments&diff=2023555&oldid=2023550
- Create the tables for each wiki:
- mwscript sql.php --wiki=testwiki --cluster=extension1 /srv/mediawiki/php-1.40.0-wmf.8/extensions/CampaignEvents/db_patches/mysql/tables-generated.sql
- mwscript sql.php --wiki=test2wiki --cluster=extension1 /srv/mediawiki/php-1.40.0-wmf.8/extensions/CampaignEvents/db_patches/mysql/tables-generated.sql
- mwscript sql.php --wiki=officewiki --cluster=extension1 /srv/mediawiki/php-1.40.0-wmf.8/extensions/CampaignEvents/db_patches/mysql/tables-generated.sql