Index: trunk/phase3/maintenance/postgres/archives/patch-protected_titles.sql |
— | — | @@ -1,11 +1,10 @@ |
2 | 2 | CREATE TABLE protected_titles ( |
3 | 3 | pt_namespace SMALLINT NOT NULL, |
4 | 4 | pt_title TEXT NOT NULL, |
5 | | - pt_by INTEGER NOT NULL, |
6 | | - pt_reason TEXT, |
| 5 | + pt_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL, |
| 6 | + pt_reason TEXT NULL, |
7 | 7 | pt_timestamp TIMESTAMPTZ NOT NULL, |
8 | 8 | pt_expiry TIMESTAMPTZ NULL, |
9 | 9 | pt_create_perm TEXT NOT NULL DEFAULT '' |
10 | 10 | ); |
11 | 11 | CREATE UNIQUE INDEX protected_titles_unique ON protected_titles(pt_namespace, pt_title); |
12 | | -CREATE INDEX protected_titles_index ON protected_titles(pt_by, pt_timestamp); |
Index: trunk/phase3/maintenance/postgres/tables.sql |
— | — | @@ -509,14 +509,13 @@ |
510 | 510 | CREATE TABLE protected_titles ( |
511 | 511 | pt_namespace SMALLINT NOT NULL, |
512 | 512 | pt_title TEXT NOT NULL, |
513 | | - pt_by INTEGER NOT NULL, |
514 | | - pt_reason TEXT, |
| 513 | + pt_user INTEGER NULL REFERENCES mwuser(user_id) ON DELETE SET NULL, |
| 514 | + pt_reason TEXT NULL, |
515 | 515 | pt_timestamp TIMESTAMPTZ NOT NULL, |
516 | 516 | pt_expiry TIMESTAMPTZ NULL, |
517 | 517 | pt_create_perm TEXT NOT NULL DEFAULT '' |
518 | 518 | ); |
519 | 519 | CREATE UNIQUE INDEX protected_titles_unique ON protected_titles(pt_namespace, pt_title); |
520 | | -CREATE INDEX protected_titles_index ON protected_titles(pt_by, pt_timestamp); |
521 | 520 | |
522 | 521 | CREATE TABLE mediawiki_version ( |
523 | 522 | type TEXT NOT NULL, |