ALTER TABLE `rv_acls`
ADD COLUMN `adgroupid`  int(11) NOT NULL AFTER `executionorder`;

ALTER TABLE `rv_acls`
ADD INDEX `rv_adgroupid` (`adgroupid`) ;

ALTER TABLE `rv_acls`
DROP INDEX `rv_acls_bannerid_executionorder`;

ALTER TABLE `rv_banners`
MODIFY COLUMN `compiledlimitation`  text CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `session_capping`;

CREATE TABLE `rv_target_show` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `adgroupid` int(11) NOT NULL,
  `targettype` varchar(200) NOT NULL,
  `targetshow` text NOT NULL,
  `targetdata` text NOT NULL,
  `updated` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `adgroupid` (`adgroupid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;