CREATE TABLE /*_*/cx_notification_log (
    -- Notification log id - autogenerated
    cxn_id int primary key auto_increment,
    -- Date when notification script was run
    cxn_date binary(14) not null,
    -- Newest draft which was updated with this script run
    cxn_newest binary(14) not null,
    -- Wiki ID of draft notification sent by the script
    cxn_wiki_id varchar(64) binary
) /*$wgDBTableOptions*/;

-- Support query: SELECT MAX(cxn_newest) WHERE cxn_wiki_id = 'X'
CREATE INDEX /*i*/cxn_wiki_id_newest ON /*_*/cx_notification_log (
    cxn_wiki_id,
    cxn_newest
);
