https://bugzilla.wikimedia.org/show_bug.cgi?id=70229

--- Comment #2 from Daniel Kinzler <[email protected]> ---
I'm not sure I agree that we need such a table (but I can be convinced). 

In any case, the basic structure should be:

 ( badge, siteId, page )

with the primary key covering all three fields, in this order. This allows us
to efficiently find all pages that have a given badge, on all sites or a given
site.

If we also want to be able to find all the badges associated with a given page
(on a given site), we'd need another index covering ( siteId, page ). This
would be useful if we wanted to show badges in listings of pages (e.g. add
icons for special pages in the Special:Allpages listing.

For convenience, we may want to have a column for the associated item id. This
would remove the need to join against wb_item_per_site in cases where we need
to know the item ID. However, we generally don't care about the associated item
in this context, do we?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to