Page MenuHomePhabricator
Paste P3595

Create contribution tracking db
ActivePublic

Authored by Ejegg on Jul 28 2016, 7:46 PM.
CREATE TABLE `contribution_tracking` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`contribution_id` int(10) unsigned DEFAULT NULL,
`form_amount` varchar(20) DEFAULT NULL,
`usd_amount` decimal(20,2) DEFAULT NULL,
`note` text,
`referrer` varchar(4096) DEFAULT NULL,
`anonymous` tinyint(1) unsigned DEFAULT NULL,
`utm_source` varchar(128) DEFAULT NULL,
`utm_medium` varchar(128) DEFAULT NULL,
`utm_campaign` varchar(128) DEFAULT NULL,
`utm_key` varchar(128) DEFAULT NULL,
`payments_form` varchar(128) DEFAULT NULL,
`optout` tinyint(1) unsigned DEFAULT NULL,
`language` varchar(8) DEFAULT NULL,
`country` varchar(2) DEFAULT NULL,
`ts` char(14) DEFAULT NULL,
`owa_session` varbinary(255) DEFAULT NULL,
`owa_ref` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `contribution_id` (`contribution_id`),
KEY `ts` (`ts`),
KEY `utm_source_id` (`utm_source`),
KEY `utm_medium_id` (`utm_medium`),
KEY `utm_campaign_id` (`utm_campaign`),
KEY `utm_campsign_id` (`utm_campaign`)
) ENGINE=InnoDB AUTO_INCREMENT=23320295 DEFAULT CHARSET=utf8