protected function execute(InputInterface $input, OutputInterface $output)
{
$conn = $this->em->getConnection();
echo "Recreating aggregation table.\n";
$conn->executeQuery('DROP TABLE IF EXISTS `aggregate`');
$conn->executeQuery('CREATE TABLE `aggregate` (' . ' `id` int(11) NOT NULL AUTO_INCREMENT,' . ' `channel_id` int(11) NOT NULL,' . ' `type` tinyint(1) NOT NULL,' . ' `timestamp` bigint(20) NOT NULL,' . ' `value` double NOT NULL,' . ' `count` int(11) NOT NULL,' . ' PRIMARY KEY (`id`),' . ' UNIQUE KEY `ts_uniq` (`channel_id`,`type`,`timestamp`)' . ')');
}