1 CREATE TABLE protected_titles (
2 pt_namespace
SMALLINT NOT NULL,
3 pt_title
TEXT NOT NULL,
4 pt_user
INTEGER NULL REFERENCES mwuser(user_id
) ON DELETE SET NULL,
6 pt_timestamp TIMESTAMPTZ
NOT NULL,
7 pt_expiry TIMESTAMPTZ
NULL,
8 pt_create_perm
TEXT NOT NULL DEFAULT ''
10 CREATE UNIQUE INDEX protected_titles_unique
ON protected_titles(pt_namespace
, pt_title
);