create table `{prefix}affiliates` (
  `id` int(7) not null auto_increment,
  `ts` int(20) not null default '0',
  `code` varchar(250) not null default '',
  `fname` varchar(250) not null default '',
  `lname` varchar(250) not null default '',
  `email` varchar(250) not null default '',
  `pass` varchar(250) not null default '',
  `ip` varchar(250) not null default '',
  `commtier` varchar(250) not null default '',
  `payinfo` mediumtext default null,
  `notes` mediumtext default null,
  `approved` enum('yes','no') not null default 'no',
  `en` enum('yes','no') not null default 'yes',
  `sys1` mediumtext default null,
  `sys2` mediumtext default null,
  `sys3` mediumtext default null,
  primary key (`id`),
  key `code` (`code`),
  key `email` (`email`),
  key `approved` (`approved`),
  key `en` (`en`),
  KEY `fname` (`fname`),
  KEY `lname` (`lname`)
) {engine}
