public function __construct($create_tables = false)
 {
     $this->create_tables = $create_tables;
     // use another table prefix?
     if (file_exists(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json')) {
         $config = json_decode(file_get_contents(WB_PATH . '/modules/' . basename(dirname(__FILE__)) . '/config.json'), true);
         if (isset($config['table_prefix'])) {
             self::$table_prefix = $config['table_prefix'];
         }
     }
     parent::__construct();
     $this->setTablePrefix(self::$table_prefix);
     $this->setTableName('mod_kit_contact_protocol');
     $this->addFieldDefinition(self::field_id, "INT NOT NULL AUTO_INCREMENT", true);
     $this->addFieldDefinition(self::field_contact_id, "INT NOT NULL DEFAULT '-1'");
     $this->addFieldDefinition(self::field_date, "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'");
     $this->addFieldDefinition(self::field_type, "VARCHAR(30) NOT NULL DEFAULT '-1'");
     $this->addFieldDefinition(self::field_memo, "TEXT NOT NULL DEFAULT ''", false, false, true);
     $this->addFieldDefinition(self::field_members, "TEXT NOT NULL DEFAULT ''");
     $this->addFieldDefinition(self::field_status, "VARCHAR(30) NOT NULL DEFAULT '" . self::status_active . "'");
     $this->addFieldDefinition(self::field_update_by, "VARCHAR(30) NOT NULL DEFAULT 'SYSTEM'");
     $this->addFieldDefinition(self::field_update_when, "DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'");
     $this->setIndexFields(array(self::field_contact_id));
     // check field definitions
     $this->checkFieldDefinitions();
     // set default timezone
     date_default_timezone_set(CFG_TIME_ZONE);
     // create tables
     if ($this->create_tables) {
         $this->initTables();
     }
 }
        $error .= sprintf('<p>[Delete Table] %s</p>', $dbContactAddress->getError());
    }
}
$dbCountries = new dbKITcountries();
if ($dbCountries->sqlTableExists()) {
    if (!$dbCountries->sqlDeleteTable()) {
        $error .= sprintf('<p>[Delete Table] %s</p>', $dbCountries->getError());
    }
}
$dbMemos = new dbKITmemos();
if ($dbMemos->sqlTableExists()) {
    if (!$dbMemos->sqlDeleteTable()) {
        $error .= sprintf('<p>[Delete Table] %s</p>', $dbMemos->getError());
    }
}
$dbKITprotocol = new dbKITprotocol();
if ($dbKITprotocol->sqlTableExists()) {
    if (!$dbKITprotocol->sqlDeleteTable()) {
        $error .= sprintf('<p>[Delete Table] %s</p>', $dbKITprotocol->getError());
    }
}
$dbKITprovider = new dbKITprovider();
if ($dbKITprovider->sqlTableExists()) {
    if (!$dbKITprovider->sqlDeleteTable()) {
        $error .= sprintf('<p>[Delete Table] %s</p>', $dbKITprovider->getError());
    }
}
$dbKITmail = new dbKITmail();
if ($dbKITmail->sqlTableExists()) {
    if (!$dbKITmail->sqlDeleteTable()) {
        $error .= sprintf('<p>[Delete Table] %s </p>', $dbKITmail->getError());