CREATE TABLE `unittestobscurecode` (
     namespace VARCHAR(200) NOT NULL
     , xid VARCHAR(125) NOT NULL
     , code VARCHAR(255) NOT NULL DEFAULT ''
     , created DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'
     , KEY namespaceidx (namespace, xid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='multipurpose obscure codes';

CREATE TABLE `unittestuser` (
       uid INT(11) NOT NULL AUTO_INCREMENT
     , nickname VARCHAR(255) NOT NULL
     , password CHAR(32)
     , emaillocal VARCHAR(200) NOT NULL
     , emaildomain VARCHAR(125) NOT NULL
     , approved TINYINT NOT NULL DEFAULT 0
     , enabled TINYINT NOT NULL DEFAULT 0
     , deleted TINYINT NOT NULL DEFAULT 0
     , forename VARCHAR(255) NOT NULL DEFAULT ''
     , surname VARCHAR(255) NOT NULL DEFAULT ''
     , lang CHAR(5) NOT NULL DEFAULT 'C'
     , country CHAR(2) NOT NULL DEFAULT 'C'
     , created DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'
     , changed DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'
     , lastlogin DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'
     , PRIMARY KEY (uid)
     , KEY email (emaillocal, emaildomain)
     , KEY (nickname)
);

CREATE TABLE `unittestgroup` (
  `gid` int(11) NOT NULL AUTO_INCREMENT,
  `groupname` varchar(255) NOT NULL,
  PRIMARY KEY  (`gid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='named user groups';

CREATE TABLE `unittestusergroup` (
  `gid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  PRIMARY KEY  (`gid`, `uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='users in groups';

