-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/abstractSchemaChanges/patch-uw_campaigns-cleanup.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
DROP  INDEX uw_campaigns_name;
DROP  INDEX uw_campaigns_enabled;
CREATE TEMPORARY TABLE /*_*/__temp__uw_campaigns AS
SELECT  campaign_id,  campaign_name,  campaign_enabled
FROM  /*_*/uw_campaigns;
DROP  TABLE  /*_*/uw_campaigns;
CREATE TABLE  /*_*/uw_campaigns (    campaign_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,    campaign_name VARCHAR(255) NOT NULL,    campaign_enabled SMALLINT DEFAULT 0 NOT NULL  );
INSERT INTO  /*_*/uw_campaigns (    campaign_id, campaign_name, campaign_enabled  )
SELECT  campaign_id,  campaign_name,  campaign_enabled
FROM  /*_*/__temp__uw_campaigns;
DROP  TABLE /*_*/__temp__uw_campaigns;
CREATE UNIQUE INDEX uw_campaigns_name ON  /*_*/uw_campaigns (campaign_name);
CREATE INDEX uw_campaigns_enabled ON  /*_*/uw_campaigns (campaign_enabled, campaign_id);