Re: Time-out problem
spd_unit:
CREATE TABLE `spd_unit` (
`id_unit` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`description` text,
`price` double(12,4) NOT NULL DEFAULT '0.0000',
`fk_id_ad` int(11) NOT NULL,
`fk_id_feed_xml` int(11) NOT NULL,
`fk_id_ad_format` int(11) NOT NULL,
`fk_id_type_unit` int(11) NOT NULL,
`last_contact` date NOT NULL,
`duration_time` int(11) NOT NULL,
`media` varchar(2048) NOT NULL,
`site_host` varchar(128) DEFAULT NULL,
`url_redirect` varchar(256) DEFAULT NULL,
`options` text,
`sku` varchar(40) DEFAULT NULL,
`cookie_duration` int(11) DEFAULT '0',
`cpa` double(5,2) DEFAULT '0.00',
`id_store` varchar(15) DEFAULT NULL,
`original_price` double DEFAULT NULL,
`installment` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id_unit`),
KEY `t_anuncio_t_pecas_fk` (`fk_id_ad`),
KEY `fk_id_ad_format` (`fk_id_ad_format`),
KEY `xml` (`fk_id_feed_xml`),
KEY `fk_id_type_unit` (`fk_id_type_unit`),
CONSTRAINT `spd_unit_ibfk_1_test` FOREIGN KEY (`fk_id_ad_format`) REFERENCES `spd_ad_format` (`id_ad_format`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_unit_ibfk_2_test` FOREIGN KEY (`fk_id_feed_xml`) REFERENCES `spd_feed_xml` (`id_feed_xml`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_unit_ibfk_3_test` FOREIGN KEY (`fk_id_type_unit`) REFERENCES `spd_type_unit` (`id_type_unit`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `t_anuncio_t_pecas_fk_test` FOREIGN KEY (`fk_id_ad`) REFERENCES `spd_ad` (`id_ad`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_unit_ibfk_1` FOREIGN KEY (`fk_id_ad_format`) REFERENCES `spd_ad_format` (`id_ad_format`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_unit_ibfk_2` FOREIGN KEY (`fk_id_feed_xml`) REFERENCES `spd_feed_xml` (`id_feed_xml`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_unit_ibfk_3` FOREIGN KEY (`fk_id_type_unit`) REFERENCES `spd_type_unit` (`id_type_unit`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `t_anuncio_t_pecas_fk` FOREIGN KEY (`fk_id_ad`) REFERENCES `spd_ad` (`id_ad`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=32574 DEFAULT CHARSET=latin1
spd_campaign:
CREATE TABLE `spd_campaign` (
`id_campaign` int(11) NOT NULL AUTO_INCREMENT,
`identifier` int(11) NOT NULL DEFAULT '0',
`name` varchar(64) NOT NULL,
`label` varchar(64) DEFAULT NULL,
`weight` int(11) NOT NULL DEFAULT '1',
`url` varchar(128) NOT NULL,
`start_date` date NOT NULL,
`end_date` date NOT NULL,
`daily_budget` decimal(10,2) NOT NULL,
`status` varchar(1) NOT NULL,
`fk_id_type_campaign` int(128) NOT NULL,
`fk_id_feed_xml` int(11) DEFAULT NULL,
`pricing` varchar(10) NOT NULL,
`fk_id_account` int(11) NOT NULL,
`percent_cut` double(4,2) NOT NULL DEFAULT '0.00',
`cpc` double(12,4) NOT NULL DEFAULT '0.0000',
`cpm` double(12,4) DEFAULT NULL,
`billing_type` varchar(10) NOT NULL DEFAULT 'cpc',
`pixel_performance` varchar(128) DEFAULT NULL,
`cap` int(11) DEFAULT NULL,
`timecap` int(11) DEFAULT NULL,
`cookie_duration` int(11) NOT NULL DEFAULT '0',
`cpa` double(5,2) NOT NULL DEFAULT '0.00',
`thumbnail` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id_campaign`),
UNIQUE KEY `identifier` (`identifier`),
KEY `t_conta_t_campanha_fk` (`fk_id_account`),
KEY `fk_id_type_campaign` (`fk_id_type_campaign`),
KEY `fk_id_feed_xml` (`fk_id_feed_xml`),
CONSTRAINT `spd_campaign_ibfk_1` FOREIGN KEY (`fk_id_account`) REFERENCES `spd_account` (`id_account`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_campaign_ibfk_2` FOREIGN KEY (`fk_id_type_campaign`) REFERENCES `spd_type_campaign` (`id_type_campaign`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `spd_campaign_ibfk_3` FOREIGN KEY (`fk_id_feed_xml`) REFERENCES `spd_feed_xml` (`id_feed_xml`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1143 DEFAULT CHARSET=latin1
spd_ad:
CREATE TABLE `spd_ad` (
`id_ad` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`fk_id_campaign` int(11) NOT NULL,
`budget` decimal(10,2) NOT NULL,
`status` varchar(1) NOT NULL,
`duration_time` int(11) NOT NULL,
`weight` int(11) NOT NULL,
PRIMARY KEY (`id_ad`),
KEY `t_campanha_t_grupo_anuncio_fk` (`fk_id_campaign`),
CONSTRAINT `t_campanha_t_grupo_anuncio_fk` FOREIGN KEY (`fk_id_campaign`) REFERENCES `spd_campaign` (`id_campaign`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=10490 DEFAULT CHARSET=latin1