Index: trunk/phase3/maintenance/postgres/tables.sql |
— | — | @@ -437,11 +437,16 @@ |
438 | 438 | log_title TEXT NOT NULL, |
439 | 439 | log_comment TEXT, |
440 | 440 | log_params TEXT, |
441 | | - log_deleted SMALLINT NOT NULL DEFAULT 0 |
| 441 | + log_deleted SMALLINT NOT NULL DEFAULT 0, |
| 442 | + log_user_text TEXT NOT NULL DEFAULT '', |
| 443 | + log_page INTEGER |
442 | 444 | ); |
443 | 445 | CREATE INDEX logging_type_name ON logging (log_type, log_timestamp); |
444 | 446 | CREATE INDEX logging_user_time ON logging (log_timestamp, log_user); |
445 | 447 | CREATE INDEX logging_page_time ON logging (log_namespace, log_title, log_timestamp); |
| 448 | +CREATE INDEX logging_times ON logging (log_timestamp); |
| 449 | +CREATE INDEX logging_user_type_time ON logging (log_user, log_type, log_timestamp); |
| 450 | +CREATE INDEX logging_page_id_time ON logging (log_page, log_timestamp); |
446 | 451 | |
447 | 452 | CREATE TABLE log_search ( |
448 | 453 | ls_field TEXT NOT NULL, |
— | — | @@ -617,8 +622,8 @@ |
618 | 623 | VALUES ('Creation','??','$LastChangedRevision$','$LastChangedDate$'); |
619 | 624 | |
620 | 625 | CREATE TABLE l10n_cache ( |
621 | | - lc_lang TEXT NOT NULL, |
622 | | - lc_key TEXT NOT NULL, |
623 | | - lc_value TEXT NOT NULL |
| 626 | + lc_lang TEXT NOT NULL, |
| 627 | + lc_key TEXT NOT NULL, |
| 628 | + lc_value TEXT NOT NULL |
624 | 629 | ); |
625 | 630 | CREATE INDEX l10n_cache_lc_lang_key ON l10n_cache (lc_lang, lc_key); |
Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -1532,6 +1532,8 @@ |
1533 | 1533 | array("revision", "rev_parent_id", "INTEGER DEFAULT NULL"), |
1534 | 1534 | array("site_stats", "ss_active_users", "INTEGER DEFAULT '-1'"), |
1535 | 1535 | array("user_newtalk", "user_last_timestamp", "TIMESTAMPTZ"), |
| 1536 | + array("logging", "log_user_text", "TEXT NOT NULL DEFAULT ''"), |
| 1537 | + array("logging", "log_page", "INTEGER"), |
1536 | 1538 | ); |
1537 | 1539 | |
1538 | 1540 | |
— | — | @@ -1600,6 +1602,8 @@ |
1601 | 1603 | array("recentchanges", "rc_timestamp_bot", "(rc_timestamp) WHERE rc_bot = 0"), |
1602 | 1604 | array("templatelinks", "templatelinks_from", "(tl_from)"), |
1603 | 1605 | array("watchlist", "wl_user", "(wl_user)"), |
| 1606 | + array("logging", "logging_user_type_time", "(log_user, log_type, log_timestamp)"), |
| 1607 | + array("logging", "logging_page_id_time", "(log_page,log_timestamp)"), |
1604 | 1608 | ); |
1605 | 1609 | |
1606 | 1610 | $newrules = array( |