$sql = $db->queryBuilder->batchInsert('url', array('url', 'source_id'), $urlInsert);
$db->createCommand($sql . ' ON DUPLICATE KEY UPDATE url=url')->execute();
CREATE TABLE `url` (
`id` bigint(10) UNSIGNED NOT NULL,
`source_id` int(10) UNSIGNED NOT NULL,
`url` varchar(255) NOT NULL,
`checked` enum('one','two') NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `url`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `url` (`url`),
ADD KEY `checked` (`checked`),
ADD KEY `source_id` (`source_id`),
ALTER TABLE `url` ADD FULLTEXT KEY `url` (`url`);
ALTER TABLE `url`
MODIFY `id` bigint(10) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;