Index: trunk/phase3/maintenance/archives/patch-log_id.sql |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +-- Log_id field that means one log entry can be referred to with a single number, |
| 3 | +-- rather than a dirty great big mess of features. |
| 4 | +-- This might be useful for single-log-entry deletion, et cetera. |
| 5 | +-- Andrew Garrett, February 2007. |
| 6 | + |
| 7 | +ALTER TABLE logging |
| 8 | + ADD COLUMN log_id SERIAL, |
| 9 | + ADD PRIMARY KEY log_id (log_id); |
Index: trunk/phase3/maintenance/archives/patch-page_restrictions_sortkey.sql |
— | — | @@ -0,0 +1,8 @@ |
| 2 | +-- Add a sort-key to page_restrictions table. |
| 3 | +-- First immediate use of this is as a sort-key for coming modifications |
| 4 | +-- of Special:Protectedpages. |
| 5 | +-- Andrew Garrett, February 2007 |
| 6 | + |
| 7 | +ALTER TABLE page_restrictions |
| 8 | + ADD COLUMN pr_id SERIAL, |
| 9 | + ADD UNIQUE KEY pr_id (pr_id); |
Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -66,6 +66,7 @@ |
67 | 67 | array( 'ipblocks', 'ipb_enable_autoblock', 'patch-ipb_optional_autoblock.sql' ), |
68 | 68 | array( 'user', 'user_newpass_time','patch-user_newpass_time.sql' ), |
69 | 69 | array( 'user', 'user_editcount', 'patch-user_editcount.sql' ), |
| 70 | + array( 'logging', 'log_id', 'patch-log_id.sql' ), |
70 | 71 | ); |
71 | 72 | |
72 | 73 | function rename_table( $from, $to, $patch ) { |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -982,6 +982,10 @@ |
983 | 983 | -- LF separated list of miscellaneous parameters |
984 | 984 | log_params blob NOT NULL, |
985 | 985 | |
| 986 | + -- Log ID, for referring to this specific log entry, probably for deletion and such. |
| 987 | + log_id int unsigned not null auto_increment, |
| 988 | + |
| 989 | + PRIMARY KEY log_id (log_id), |
986 | 990 | KEY type_time (log_type, log_timestamp), |
987 | 991 | KEY user_time (log_user, log_timestamp), |
988 | 992 | KEY page_time (log_namespace, log_title, log_timestamp), |
— | — | @@ -1089,9 +1093,12 @@ |
1090 | 1094 | pr_user int(8) NULL, |
1091 | 1095 | -- Field for time-limited protection. |
1092 | 1096 | pr_expiry char(14) binary NULL, |
| 1097 | + -- Field for an ID for this restrictions row (sort-key for Special:ProtectedPages) |
| 1098 | + pr_id int unsigned not null auto_increment, |
1093 | 1099 | |
1094 | 1100 | PRIMARY KEY (pr_page,pr_type), |
1095 | 1101 | |
| 1102 | + UNIQUE KEY pr_id (pr_id), |
1096 | 1103 | KEY pr_page (pr_page), |
1097 | 1104 | KEY pr_typelevel (pr_type,pr_level), |
1098 | 1105 | KEY pr_level (pr_level), |