
CREATE DATABASE /*!32312 IF NOT EXISTS*/ Philter;


CREATE TABLE `actions` (
  `uid` int(11) NOT NULL default '0',
  `rid` int(11) NOT NULL default '0',
  `pid` int(11) NOT NULL default '0',
  `data` text NOT NULL
) TYPE=MyISAM;

CREATE TABLE `emails` (
  `uid` int(11) NOT NULL default '0',
  `mid` smallint(6) NOT NULL default '0',
  `email` tinytext NOT NULL,
  `broken` datetime NOT NULL default '0000-00-00 00:00:00',
  `flags` set('active') NOT NULL default 'active',
  PRIMARY KEY  (`uid`,`mid`)
) TYPE=MyISAM;

CREATE TABLE `matches` (
  `uid` int(11) NOT NULL default '0',
  `rid` int(11) NOT NULL default '0',
  `pid` int(11) NOT NULL default '0',
  `data` text NOT NULL
) TYPE=MyISAM;

CREATE TABLE `rules` (
  `uid` int(11) NOT NULL default '0',
  `rid` int(11) NOT NULL default '0',
  `rank` int(11) NOT NULL default '0',
  `flags` set('all','block') NOT NULL default '',
  `name` tinytext NOT NULL,
  PRIMARY KEY  (`uid`,`rid`),
  KEY `uid` (`uid`,`rank`)
) TYPE=MyISAM;

