Example #1
0
 /**
  * Create track tables if required.
  */
 public function prepareTrackTables()
 {
     if (!$this->dbms->tableExists('dbtrack_actions') && !$this->dbms->tableExists('dbtrack_data')) {
         $sql = $this->dbms->loadSQLTemplate('tables');
         $this->dbms->executeScript($sql);
         if (!$this->dbms->tableExists('dbtrack_actions') || !$this->dbms->tableExists('dbtrack_data')) {
             throw new \Exception('Could not create tracking tables.');
         }
     }
 }