#
# Table structure for table `altuseremail`
#

CREATE TABLE `altuseremail` (
  `id` int(11) NOT NULL auto_increment,
  `userid` int(11) NOT NULL default '0',
  `email` varchar(50) NOT NULL default '',
  `sendnotifications` tinyint(4) NOT NULL default '1',
  `sendinvoice` tinyint(4) NOT NULL default '1',
  `sendsupport` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `customuserfields`
#

CREATE TABLE `customuserfields` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL default '',
  `type` tinyint(4) NOT NULL default '0',
  `isrequired` tinyint(4) NOT NULL default '0',
  `isChangable` tinyint(4) NOT NULL default '1',
  `isAdminOnly` tinyint(4) NOT NULL default '0',
  `width` mediumint(9) NOT NULL default '20',
  `myOrder` int(11) NOT NULL default '0',
  `showcustomer` tinyint(4) NOT NULL default '1',
  `showadmin` tinyint(4) NOT NULL default '1',
  `InSignup` tinyint(1) NOT NULL default '0',
  `inSettings` smallint(6) NOT NULL default '1',
  `dropdownoptions` longtext NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=25 ;

# --------------------------------------------------------

#
# Table structure for table `domains`
#

CREATE TABLE `domains` (
  `id` int(11) NOT NULL auto_increment,
  `DomainName` text,
  `CustomerID` int(11) default NULL,
  `UserName` text,
  `password` tinyblob NOT NULL,
  `recurring` tinyint(4) default NULL,
  `registration_years` tinyint(4) NOT NULL default '0',
  `Comments` mediumtext,
  `current` tinyint(4) NOT NULL default '1',
  `billsent` tinyint(1) NOT NULL default '0',
  `registrar_orderid` varchar(50) NOT NULL default '0',
  `status` tinyint(1) NOT NULL default '0',
  `Plan` int(11) NOT NULL default '0',
  `dateActivated` date default NULL,
  `controlpanel` int(11) NOT NULL default '0',
  `serverid` int(11) NOT NULL default '0',
  `server_acct_properties` TEXT default NULL,
  `domain_extra_attr` TEXT default NULL,
  `shared` tinyint(4) NOT NULL default '1',
  `nextbilldate` date default NULL,
  `paymentterm` tinyint(4) default NULL,
  `promotionid` int(11) NOT NULL default '0',
  `register` TINYINT NOT NULL DEFAULT '0',
  `signup` TINYINT NOT NULL DEFAULT '0',
  `custom_price` FLOAT NOT NULL DEFAULT '0',
  `use_custom_price` TINYINT NOT NULL DEFAULT '0',
  PRIMARY KEY  (`id`),
  KEY `CustomerID` (`CustomerID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `user_customuserfields`
#

CREATE TABLE `user_customuserfields` (
  `userid` int(11) NOT NULL default '0',
  `customid` int(11) NOT NULL default '0',
  `value` text,
  PRIMARY KEY  (`userid`,`customid`)
) ENGINE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `clients_notes`
#

CREATE TABLE `clients_notes` (
    `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    `date` datetime NOT NULL,
    `target_id` INT NOT NULL ,
    `is_target_group` tinyint(4) NOT NULL default '0',
    `admin_id` int(11) NOT NULL,
    `note` TEXT NOT NULL ,
    `visible_client` TINYINT NOT NULL,
    `archived` TINYINT NOT NULL DEFAULT '0'
) ENGINE = MYISAM;

# --------------------------------------------------------

#
# Table structure for table `clients_notes_tickettypes`
#

CREATE TABLE `clients_notes_tickettypes` (
  `note_id` int(11) NOT NULL,
  `tickettype_id` int(11) NOT NULL,
  PRIMARY KEY  (`note_id`,`tickettype_id`)
) ENGINE=MyISAM;

