text: /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8 */;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `account_group_map`
  --
  
  DROP TABLE IF EXISTS `account_group_map`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `account_group_map` (
    `map_id` int(11) NOT NULL AUTO_INCREMENT,
    `account_id` int(11) NOT NULL,
    `group_id` int(11) NOT NULL,
    `is_admin` int(11) NOT NULL,
    PRIMARY KEY (`map_id`),
    UNIQUE KEY `account_group_map_account_id_group_id` (`account_id`,`group_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `accounts`
  --
  
  DROP TABLE IF EXISTS `accounts`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `accounts` (
    `cid` int(10) NOT NULL AUTO_INCREMENT,
    `gid` int(10) DEFAULT '0',
    `Email` varchar(60) NOT NULL DEFAULT '',
    `Password` varchar(100) NOT NULL DEFAULT '',
    `First_Name` varchar(20) NOT NULL DEFAULT '',
    `Last_Name` varchar(20) NOT NULL DEFAULT '',
    `Phone` varchar(15) NOT NULL DEFAULT '',
    `Account_Type` enum('user','group_admin','senior_admin') NOT NULL DEFAULT 'user',
    `Status` enum('active','inactive') NOT NULL DEFAULT 'inactive',
    UNIQUE KEY `cid` (`cid`,`Email`)
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `api_keys`
  --
  
  DROP TABLE IF EXISTS `api_keys`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `api_keys` (
    `apikey_id` int(11) NOT NULL AUTO_INCREMENT,
    `account_id` int(11) NOT NULL,
    `description` varchar(255) NOT NULL,
    `key` varchar(255) NOT NULL,
    `secret` varchar(255) NOT NULL,
    `date_created` int(11) NOT NULL,
    `deleted` int(11) NOT NULL,
    PRIMARY KEY (`apikey_id`),
    UNIQUE KEY `api_keys_key` (`key`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `default_records`
  --
  
  DROP TABLE IF EXISTS `default_records`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `default_records` (
    `record_id` int(11) NOT NULL AUTO_INCREMENT,
    `group_owner_id` int(11) DEFAULT NULL,
    `host` varchar(100) NOT NULL DEFAULT '',
    `type` char(1) DEFAULT NULL,
    `val` varchar(512) DEFAULT NULL,
    `distance` int(4) DEFAULT '0',
    `weight` int(4) DEFAULT NULL,
    `port` int(4) DEFAULT NULL,
    `ttl` int(11) NOT NULL DEFAULT '86400',
    `default_type` enum('system','group') NOT NULL DEFAULT 'system',
    UNIQUE KEY `records_id` (`record_id`)
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `domain_group_map`
  --
  
  DROP TABLE IF EXISTS `domain_group_map`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `domain_group_map` (
    `map_id` int(11) NOT NULL AUTO_INCREMENT,
    `group_id` int(11) NOT NULL,
    `domain_id` int(11) NOT NULL,
    `permissions` int(11) NOT NULL,
    PRIMARY KEY (`map_id`),
    UNIQUE KEY `domain_group_map_domain_id_group_id` (`domain_id`,`group_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `domains`
  --
  
  DROP TABLE IF EXISTS `domains`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `domains` (
    `domain_id` int(11) NOT NULL AUTO_INCREMENT,
    `domain` varchar(100) NOT NULL DEFAULT '',
    `owner_id` int(11) DEFAULT NULL,
    `group_owner_id` int(11) DEFAULT NULL,
    `status` enum('active','inactive') NOT NULL DEFAULT 'inactive',
    KEY `domain_id` (`domain_id`,`domain`)
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `groups`
  --
  
  DROP TABLE IF EXISTS `groups`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `groups` (
    `group_id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(255) NOT NULL,
    PRIMARY KEY (`group_id`),
    UNIQUE KEY `groups_name` (`name`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `log`
  --
  
  DROP TABLE IF EXISTS `log`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `log` (
    `log_id` INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
    `domain_id` int(11) NOT NULL DEFAULT '0',
    `cid` int(11) NOT NULL DEFAULT '0',
    `Email` varchar(60) NOT NULL DEFAULT '',
    `Name` varchar(60) NOT NULL DEFAULT '',
    `entry` varchar(200) NOT NULL DEFAULT '',
    `time` int(11) NOT NULL DEFAULT '0'
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `oauth_access_tokens`
  --
  
  DROP TABLE IF EXISTS `oauth_access_tokens`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `oauth_access_tokens` (
    `access_token_id` int(11) NOT NULL AUTO_INCREMENT,
    `account_id` int(11) NOT NULL,
    `apikey_id` int(11) NOT NULL,
    `access_token` varchar(36) NOT NULL,
    `grant_type` varchar(20) NOT NULL,
    `expires_at` int(11) NOT NULL,
    PRIMARY KEY (`access_token_id`),
    UNIQUE KEY `oauth_access_tokens_access_token` (`access_token`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `records`
  --
  
  DROP TABLE IF EXISTS `records`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `records` (
    `domain_id` int(11) NOT NULL DEFAULT '0',
    `record_id` int(11) NOT NULL AUTO_INCREMENT,
    `host` varchar(100) NOT NULL DEFAULT '',
    `type` char(1) DEFAULT NULL,
    `val` varchar(512) DEFAULT NULL,
    `distance` int(4) DEFAULT '0',
    `weight` int(4) DEFAULT NULL,
    `port` int(4) DEFAULT NULL,
    `ttl` int(11) NOT NULL DEFAULT '86400',
    `location_id` int(11) UNSIGNED DEFAULT NULL,
    UNIQUE KEY `records_id` (`record_id`),
    KEY `records_idx` (`domain_id`,`record_id`,`host`)
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `password_reset_tokens`
  --
  
  DROP TABLE IF EXISTS `password_reset_tokens`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `password_reset_tokens` (
    `token_id` int(11) NOT NULL AUTO_INCREMENT,
    `account_id` int(11) NOT NULL,
    `token_value` varchar(255) NOT NULL,
    `date_created` int(11) NOT NULL,
    PRIMARY KEY (`token_id`),
    UNIQUE KEY `password_reset_tokens_token_value` (`token_value`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  DROP TABLE IF EXISTS `locations`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `locations` (
    `location_id` int(11) NOT NULL AUTO_INCREMENT,
    `location` VARCHAR(2) NOT NULL DEFAULT '',
    `location_description` VARCHAR(256) NULL,
    PRIMARY KEY (`location_id`),
    UNIQUE KEY `location` (`location`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  DROP TABLE IF EXISTS `location_prefixes`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `location_prefixes` (
    `prefix_id` int(11) NOT NULL AUTO_INCREMENT,
    `location_id` int(11) NOT NULL,
    `prefix` VARCHAR(512) NOT NULL DEFAULT '',
    `prefix_type` VARCHAR(10) NOT NULL DEFAULT 'ipv4',
    `prefix_description` VARCHAR(256) NULL,
    PRIMARY KEY (`prefix_id`),
    UNIQUE KEY `prefix` (`prefix`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  