summaryrefslogtreecommitdiff
path: root/maintenance/archives/patch-ipb_expiry.sql
blob: 0f106d7010f68d72d9d9fa983c263b6efa02ec34 (plain)
1
2
3
4
5
6
7
8
-- Adds the ipb_expiry field to ipblocks

ALTER TABLE /*$wgDBprefix*/ipblocks ADD ipb_expiry char(14) binary NOT NULL default '';

-- All IP blocks have one day expiry
UPDATE /*$wgDBprefix*/ipblocks SET ipb_expiry = date_format(date_add(ipb_timestamp,INTERVAL 1 DAY),"%Y%m%d%H%i%s") WHERE ipb_user = 0;

-- Null string is fine for user blocks, since this indicates infinity