SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

CREATE TABLE IF NOT EXISTS `officity:filters` (
  `ID` int(4) NOT NULL auto_increment,
  `Activity` tinyint(1) default '1',
  `Usage` enum('user','mailing','report') NOT NULL default 'user',
  `Default` tinyint(1) NOT NULL default '0',
  `Module` varchar(128) default NULL,
  `Denomination` varchar(256) NOT NULL,
  `isQuery` tinyint(1) NOT NULL default '0',
  `QueryXML` text NOT NULL,
  `isDisplay` tinyint(1) NOT NULL default '0',
  `DisplayXML` text NOT NULL,
  `Search` tinyint(1) NOT NULL default '1',
  `Count` tinyint(1) NOT NULL default '0',
  `IsLocked` tinyint(1) default '0',
  `CreatorID` int(4) default '0',
  `OwnerID` int(4) default '0',
  `GroupID` int(4) default '0',
  `ModifierID` int(4) default '0',
  `CreationDate` datetime default '0000-00-00 00:00:00',
  `ModificationDate` datetime default '0000-00-00 00:00:00',
  `SearchText` text,
  PRIMARY KEY  (`ID`),
  KEY `OwnerID` (`OwnerID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ;

INSERT INTO `officity:filters` (`ID`, `Activity`, `Usage`, `Default`, `Module`, `Denomination`, `isQuery`, `QueryXML`, `isDisplay`, `DisplayXML`, `Search`, `Count`, `IsLocked`, `CreatorID`, `OwnerID`, `GroupID`, `ModifierID`, `CreationDate`, `ModificationDate`, `SearchText`) VALUES
(1, 1, 'user', 0, NULL, '', 1, '', 1, '', 1, 0, 1, 0, 0, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', ''),
(2, 1, 'user', 1, 'contact', 'Default Contact filter', 0, '', 1, '<RETURN><INFO><ID order="1"/><LASTNAME order="2"/><FIRSTNAME order="3"/><EMAIL1 order="4"/></INFO></RETURN><SORT select="INFO/LASTNAME" order="ascending"/><PAGINATE display="250" page="1"/>', 1, 0, 0, 0, 0, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', ''),
(3, 1, 'user', 1, 'officity:task', 'Default Task filter', 0, '', 1, '<RETURN><INFO><TYPE order="1"/><TITLE order="2"/><STATUS order="3"/><STARTDATE order="4"/><DUEDATE order="5"/><COMPLETED order="6"/><ROOT order="7"/></INFO></RETURN><SORT select="INFO/TYPE" order="descending"/><PAGINATE display="250" page="1"/>', 1, 0, 0, 0, 0, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', ''),
(4, 1, 'user', 1, 'officity:wiki', 'Default Wiki filter', 0, '', 1, '<RETURN><INFO><TYPE order="1"></TYPE><TITLE order="2"></TITLE><MODIFICATIONDATE order="3"></MODIFICATIONDATE></INFO></RETURN><SORT  select="INFO/CREATIONDATE" order="ascending"></SORT><PAGINATE display="250" page="1"></PAGINATE>', 1, 0, 0, 0, 0, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '');


