1 -- Table defining tag names for IDs. Also stores hit counts to avoid expensive queries on change_tag
3 CREATE TABLE /*_*/change_tag_def (
4 -- Numerical ID of the tag (ct_tag_id refers to this)
5 ctd_id
int NOT NULL CONSTRAINT PK_change_tag_def
PRIMARY KEY IDENTITY,
6 -- Symbolic name of the tag (what would previously be put in ct_tag)
7 ctd_name
nvarchar(255) NOT NULL,
8 -- Whether this tag was defined manually by a privileged user using Special:Tags
9 ctd_user_defined tinyint
NOT NULL CONSTRAINT DF_ctd_user_defined
DEFAULT 0,
10 -- Number of times this tag was used
11 ctd_count
int NOT NULL CONSTRAINT DF_ctd_count
DEFAULT 0
12 ) /*$wgDBTableOptions*/;
14 CREATE UNIQUE INDEX /*i*/ctd_name
ON /*_*/change_tag_def (ctd_name
);
15 CREATE INDEX /*i*/ctd_count
ON /*_*/change_tag_def (ctd_count
);
16 CREATE INDEX /*i*/ctd_user_defined
ON /*_*/change_tag_def (ctd_user_defined
);