The Community Tech team has started working on a new project called Watchlist Expiry. We need a new DB table to store the expiration timestamp and watchlist item ID.
* Predicted usage:
** About xxx regular users
** About xxx rows
** Have a periodic purging of the Watchlist table (and the watchlist_expiry table) -- purging all items that have timestamp that is before the current time from both tables. https://phabricator.wikimedia.org/T235005#5714344
** Common xxx expiration date
* Queries:
** Create:
```lang=sql
CREATE TABLE `watchlist_expiry` (
`we_item` int unsigned NOT NULL PRIMARY KEY,
`we_expiry` binary(14) NOT NULL
) /*$wgDBTableOptions*/;
CREATE INDEX `we_expiry` ON `watchlist_expiry` (`we_expiry`);
```
** Purge expired items:
```lang=sql
DELETE `watchlist`, `watchlist_expiry` FROM `watchlist_expiry` JOIN `watchlist` ON (`we_item`=`wl_id`) WHERE `we_expiry` < NOW();
```
*** PLEASE DO NOT TAG DBA TEAM TILL COMMUNITY TECH REVIEWS AND APPROVES THIS TICKET*********