Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.sql |
— | — | @@ -4,15 +4,26 @@ |
5 | 5 | |
6 | 6 | -- Watch groups |
7 | 7 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/swl_groups ( |
8 | | - group_id INT(10) unsigned NOT NULL auto_increment PRIMARY KEY, |
9 | | - group_categories BLOB NOT NULL, -- No need to have this stuff relational, so keep it simple |
10 | | - group_namespaces BLOB NOT NULL, -- No need to have this stuff relational, so keep it simple |
11 | | - group_properties BLOB NOT NULL, -- No need to have this stuff relational, so keep it simple |
| 8 | + group_id INT(10) unsigned NOT NULL auto_increment PRIMARY KEY, |
| 9 | + group_categories BLOB NOT NULL, -- No need to have this stuff relational, so keep it simple |
| 10 | + group_namespaces BLOB NOT NULL, -- No need to have this stuff relational, so keep it simple |
| 11 | + group_properties BLOB NOT NULL -- No need to have this stuff relational, so keep it simple |
12 | 12 | ) /*$wgDBTableOptions*/; |
13 | 13 | |
| 14 | +-- List of all changes made to properties. |
| 15 | +CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/swl_changes ( |
| 16 | + change_id INT(10) unsigned NOT NULL auto_increment PRIMARY KEY, |
| 17 | + change_user_id INT(10) unsigned NOT NULL, |
| 18 | + change_page_id INT(10) unsigned NOT NULL, |
| 19 | + change_property VARCHAR(255) NOT NULL, |
| 20 | + change_old_value BLOB NULL, |
| 21 | + change_new_value BLOB NULL, |
| 22 | + change_type INT(1) unsigned NOT NULL |
| 23 | +) /*$wgDBTableOptions*/; |
| 24 | + |
14 | 25 | -- Watchlists |
15 | | -CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/swl_watchlists ( |
16 | | - list _id INT(10) unsigned NOT NULL auto_increment PRIMARY KEY, |
17 | | - list_user_id INT(10) unsigned NOT NULL UNIQUE, -- TODO |
18 | | - -- TODO |
| 26 | +CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/swl_changes_per_group ( |
| 27 | + cpg_group_id INT(10) unsigned NOT NULL, |
| 28 | + cpg_change_id INT(10) unsigned NOT NULL, |
| 29 | + PRIMARY KEY (cpg_group_id,cpg_change_id) |
19 | 30 | ) /*$wgDBTableOptions*/; |
\ No newline at end of file |
Index: trunk/extensions/SemanticWatchlist/SemanticWatchlist.hooks.php |
— | — | @@ -150,6 +150,18 @@ |
151 | 151 | dirname( __FILE__ ) . '/SemanticWatchlist.sql', |
152 | 152 | true |
153 | 153 | ) ); |
| 154 | + $updater->addExtensionUpdate( array( |
| 155 | + 'addTable', |
| 156 | + 'swl_changes', |
| 157 | + dirname( __FILE__ ) . '/SemanticWatchlist.sql', |
| 158 | + true |
| 159 | + ) ); |
| 160 | + $updater->addExtensionUpdate( array( |
| 161 | + 'addTable', |
| 162 | + 'swl_changes_per_group', |
| 163 | + dirname( __FILE__ ) . '/SemanticWatchlist.sql', |
| 164 | + true |
| 165 | + ) ); |
154 | 166 | } |
155 | 167 | |
156 | 168 | return true; |