public function init($config)
{
$db = $this->getDbConnection();
$db->setActive(true);
$sql = 'SELECT * FROM ' . $this->_logTable . ' WHERE 0=1';
try {
$db->createCommand($sql)->query()->close();
} catch (Exception $e) {
// DB table not exists
if ($this->_autoCreate) {
$this->createDbTable();
} else {
throw new TConfigurationException('db_logtable_inexistent', $this->_logTable);
}
}
parent::init($config);
}