Index: trunk/extensions/AbuseFilter/abusefilter.tables.pg.sql |
— | — | @@ -16,7 +16,8 @@ |
17 | 17 | af_hit_count INTEGER NOT NULL DEFAULT 0, |
18 | 18 | af_throttled SMALLINT NOT NULL DEFAULT 0, |
19 | 19 | af_deleted SMALLINT NOT NULL DEFAULT 0, |
20 | | - af_actions TEXT NOT NULL DEFAULT '' |
| 20 | + af_actions TEXT NOT NULL DEFAULT '', |
| 21 | + af_global SMALLINT NOT NULL DEFAULT 0 |
21 | 22 | ); |
22 | 23 | CREATE INDEX abuse_filter_user ON abuse_filter(af_user); |
23 | 24 | |
— | — | @@ -33,7 +34,7 @@ |
34 | 35 | CREATE SEQUENCE abuse_filter_log_afl_id_seq; |
35 | 36 | CREATE TABLE abuse_filter_log ( |
36 | 37 | afl_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('abuse_filter_log_afl_id_seq'), |
37 | | - afl_filter INTEGER NOT NULL, |
| 38 | + afl_filter TEXT NOT NULL, |
38 | 39 | afl_user INTEGER NOT NULL, |
39 | 40 | afl_user_text TEXT NOT NULL, |
40 | 41 | afl_ip TEXT NOT NULL, |
— | — | @@ -42,7 +43,9 @@ |
43 | 44 | afl_var_dump TEXT NOT NULL, |
44 | 45 | afl_timestamp TIMESTAMPTZ NOT NULL, |
45 | 46 | afl_namespace SMALLINT NOT NULL, |
46 | | - afl_title TEXT NOT NULL |
| 47 | + afl_title TEXT NOT NULL, |
| 48 | + afl_wiki TEXT NULL, |
| 49 | + afl_deleted SMALLINT NULL |
47 | 50 | ); |
48 | 51 | CREATE INDEX abuse_filter_log_filter ON abuse_filter_log(afl_filter); |
49 | 52 | CREATE INDEX abuse_filter_log_ip ON abuse_filter_log(afl_ip); |
Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php |
— | — | @@ -151,7 +151,7 @@ |
152 | 152 | } |
153 | 153 | |
154 | 154 | public static function onLoadExtensionSchemaUpdates() { |
155 | | - global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields, $wgExtNewIndexes, $wgDBtype; |
| 155 | + global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields, $wgExtPGAlteredFields, $wgExtNewIndexes, $wgDBtype; |
156 | 156 | |
157 | 157 | $dir = dirname( __FILE__ ); |
158 | 158 | |
— | — | @@ -169,8 +169,14 @@ |
170 | 170 | array( 'abuse_filter', "$dir/abusefilter.tables.pg.sql" ), |
171 | 171 | array( 'abuse_filter_history', "$dir/db_patches/patch-abuse_filter_history.pg.sql" ), |
172 | 172 | ) ); |
173 | | - $wgExtPGNewFields[] = array('abuse_filter', 'af_deleted', "SMALLINT NOT NULL DEFAULT 0" ); |
174 | 173 | $wgExtPGNewFields[] = array('abuse_filter', 'af_actions', "TEXT NOT NULL DEFAULT ''" ); |
| 174 | + $wgExtPGNewFields[] = array('abuse_filter', 'af_deleted', 'SMALLINT NOT NULL DEFAULT 0' ); |
| 175 | + $wgExtPGNewFields[] = array('abuse_filter', 'af_global', 'SMALLINT NOT NULL DEFAULT 0' ); |
| 176 | + |
| 177 | + $wgExtPGNewFields[] = array('abuse_filter_log', 'afl_wiki', 'TEXT' ); |
| 178 | + $wgExtPGNewFields[] = array('abuse_filter_log', 'afl_deleted', 'SMALLINT' ); |
| 179 | + $wgExtPGAlteredFields[] = array('abuse_filter_log', 'afl_filter', 'TEXT' ); |
| 180 | + |
175 | 181 | $wgExtNewIndexes[] = array('abuse_filter_log', 'abuse_filter_log_ip', "(afl_ip)"); |
176 | 182 | } |
177 | 183 | return true; |