diff options
Diffstat (limited to 'sql/sqlite/patch-watchlist-wl_title-varbinary.sql')
-rw-r--r-- | sql/sqlite/patch-watchlist-wl_title-varbinary.sql | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/sqlite/patch-watchlist-wl_title-varbinary.sql b/sql/sqlite/patch-watchlist-wl_title-varbinary.sql new file mode 100644 index 000000000000..f0c681696658 --- /dev/null +++ b/sql/sqlite/patch-watchlist-wl_title-varbinary.sql @@ -0,0 +1,21 @@ +CREATE TABLE /*_*/watchlist_tmp ( + wl_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + wl_user INTEGER UNSIGNED NOT NULL, + wl_namespace INTEGER DEFAULT 0 NOT NULL, + wl_title BLOB DEFAULT '' NOT NULL, + wl_notificationtimestamp BLOB DEFAULT NULL +); + +INSERT INTO /*_*/watchlist_tmp + SELECT wl_id, wl_user, wl_namespace, wl_title, wl_notificationtimestamp + FROM /*_*/watchlist; +DROP TABLE /*_*/watchlist; +ALTER TABLE /*_*/watchlist_tmp RENAME TO /*_*/watchlist; + +CREATE UNIQUE INDEX wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title); + +CREATE INDEX namespace_title ON /*_*/watchlist (wl_namespace, wl_title); + +CREATE INDEX wl_user_notificationtimestamp ON /*_*/watchlist ( + wl_user, wl_notificationtimestamp +);
\ No newline at end of file |