2 -- Slots represent an n:m relation between revisions and content objects.
3 -- A content object can have a specific "role" in one or more revisions.
4 -- Each revision can have multiple content objects, each having a different role.
6 CREATE TABLE /*_*/slots (
9 slot_revision_id
bigint unsigned
NOT NULL,
11 -- reference to role_id
12 slot_role_id
smallint unsigned
NOT NULL,
14 -- reference to content_id
15 slot_content_id
bigint unsigned
NOT NULL,
17 -- The revision ID of the revision that originated the slot's content.
18 -- To find revisions that changed slots, look for slot_origin = slot_revision_id.
19 slot_origin
bigint unsigned
NOT NULL,
21 PRIMARY KEY ( slot_revision_id
, slot_role_id
)
22 ) /*$wgDBTableOptions*/;
24 -- Index for finding revisions that modified a specific slot
25 CREATE INDEX /*i*/slot_revision_origin_role
ON /*_*/slots (slot_revision_id
, slot_origin
, slot_role_id
);