Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git] / maintenance / archives / patch-slots.sql
1 --
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.
5 --
6 CREATE TABLE /*_*/slots (
7
8 -- reference to rev_id
9 slot_revision_id bigint unsigned NOT NULL,
10
11 -- reference to role_id
12 slot_role_id smallint unsigned NOT NULL,
13
14 -- reference to content_id
15 slot_content_id bigint unsigned NOT NULL,
16
17 -- whether the content is inherited (1) or new in this revision (0)
18 slot_inherited tinyint unsigned NOT NULL DEFAULT 0,
19
20 PRIMARY KEY ( slot_revision_id, slot_role_id )
21 ) /*$wgDBTableOptions*/;
22
23 -- Index for finding revisions that modified a specific slot
24 CREATE INDEX /*i*/slot_role_inherited ON /*_*/slots (slot_revision_id, slot_role_id, slot_inherited);