Add database schema for the dashboard registry
Model a dashboard as a wiki page, identified
by its stable MediaWiki page_id within a wiki.
Wiki metadata (hostname, display name) is normalised into a wikis
dimension table; dashboards references it via wiki_id, keyed
UNIQUE(wiki_id, page_id).
Both tables use a surrogate INT primary key to keep the clustered index
narrow. This matters because a future dashboard_runs history table will
carry a foreign key to dashboards.id in every row.
Beyond identity, dashboards stores three derived browse/aggregation
dimensions, so we can group and filter by where a dashboard lives:
- namespace_canonical: MediaWiki canonical namespace ('Project', 'User', …), the cross-wiki GROUP BY key.
- namespace_localized: the per-wiki label ('Wikidata', 'Meta', …) for display. Stored alongside canonical because it cannot be backfilled later (ToolsDB can't join the wiki replicas), so record time is the only cheap moment to capture it. The two coincide for most namespaces and diverge on Project / non-English wikis.
- root_page: first path segment of the namespace-stripped title (e.g. 'WikiProject Music', a username).
Two nullable provenance columns (page_creator and page_created_at)
record who created the wiki page and when (from the oldest revision).
These are immutable and will be populated lazily by a separate batch job,
not on the hot record() path; NULL means "not yet fetched."
page_url, page_title and the three dimensions are mutable columns,
refreshed whenever a page is re-recorded, so renames and definition
edits keep the same identity (and, later, the same run history).
The separate wikis table is modelled after the equivalent table in the
Listeria tool (numeric PK, ACTIVE status, referenced by FK).
It also lays groundwork for supporting multiple Wikibase instances later (T294892).
Also disable sqlfluff RF04, as it flags common column names used in the schema.
Bug: T435900