From aa75892b60a1132a6e282edbb58ae90b7761886b Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 17 Apr 2008 14:42:07 +0000 Subject: [PATCH] Add user_timestamp for diff since last view for new messages. --- maintenance/archives/patch-user_timestamp.sql | 3 +++ maintenance/tables.sql | 3 +++ maintenance/updaters.inc | 1 + 3 files changed, 7 insertions(+) create mode 100644 maintenance/archives/patch-user_timestamp.sql diff --git a/maintenance/archives/patch-user_timestamp.sql b/maintenance/archives/patch-user_timestamp.sql new file mode 100644 index 0000000000..b1f49a7d16 --- /dev/null +++ b/maintenance/archives/patch-user_timestamp.sql @@ -0,0 +1,3 @@ +-- For getting diff since last view +ALTER TABLE /*$wgDBprefix*/user_newtalk + ADD user_timestamp binary(14) NOT NULL default ''; diff --git a/maintenance/tables.sql b/maintenance/tables.sql index fa7e75fe06..ff22bde772 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -166,6 +166,9 @@ CREATE TABLE /*$wgDBprefix*/user_newtalk ( -- If the user is an anonymous user their IP address is stored here -- since the user_id of 0 is ambiguous user_ip varbinary(40) NOT NULL default '', + -- The highest timestamp of revisions of the talk page viewed + -- by this user + user_timestamp binary(14) NOT NULL default '', INDEX user_id (user_id), INDEX user_ip (user_ip) diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index e0208b6e4f..63a2671ac1 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -138,6 +138,7 @@ $wgMysqlUpdates = array( array( 'add_table', 'category', 'patch-category.sql' ), array( 'do_category_population' ), array( 'add_field', 'archive', 'ar_parent_id', 'patch-ar_parent_id.sql'), + array( 'add_field', 'user_newtalk', 'user_timestamp', 'patch-user_timestamp.sql'), array( 'do_populate_parent_id' ), ); -- 2.20.1