1 DROP TABLE IF EXISTS /*_*/watchlist_tmp;
3 CREATE TABLE /*$wgDBprefix*/watchlist_tmp (
4 wl_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
5 wl_user INTEGER NOT NULL,
6 wl_namespace INTEGER NOT NULL default 0,
7 wl_title TEXT NOT NULL default '',
8 wl_notificationtimestamp BLOB
11 INSERT OR IGNORE INTO /*_*/watchlist_tmp (
12 wl_user, wl_namespace, wl_title, wl_notificationtimestamp )
14 wl_user, wl_namespace, wl_title, wl_notificationtimestamp
17 DROP TABLE /*_*/watchlist;
19 ALTER TABLE /*_*/watchlist_tmp RENAME TO /*_*/watchlist;
21 CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title);
22 CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title);
23 CREATE INDEX /*i*/wl_user_notificationtimestamp ON /*_*/watchlist (wl_user, wl_notificationtimestamp);