SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

CREATE TABLE IF NOT EXISTS `officity:requests` (
  `ID` int(4) NOT NULL auto_increment,
  `Activity` tinyint(1) default '1',
  `Type` enum('','UPDATE','CREATE','DELETE') NOT NULL,
  `Status` enum('pending','running','finished','canceled') NOT NULL default 'pending',
  `Domain` varchar(255) NOT NULL,
  `Module` varchar(128) NOT NULL,
  `ElementID` int(4) NOT NULL default '0',
  `Denomination` varchar(255) NOT NULL,
  `BodyXML` text NOT NULL,
  `Command` varchar(512) NOT NULL,
  `CommandXML` text NOT NULL,
  `Callback` varchar(512) NOT NULL,
  `CallbackXML` text NOT NULL,
  `Fallback` varchar(512) NOT NULL,
  `FallbackXML` text NOT NULL,
  `WishedDate` date NOT NULL default '0000-00-00',
  `Notes` varchar(512) NOT NULL,
  `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 `Status` (`Status`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC ;

INSERT INTO `officity:requests` (`ID`, `Activity`, `Type`, `Status`, `Domain`, `Module`, `ElementID`, `Denomination`, `BodyXML`, `Command`, `CommandXML`, `Callback`, `CallbackXML`, `Fallback`, `FallbackXML`, `WishedDate`, `Notes`, `IsLocked`, `CreatorID`, `OwnerID`, `GroupID`, `ModifierID`, `CreationDate`, `ModificationDate`, `SearchText`) VALUES
(1, 1, '', 'pending', '', '', 0, '', '', '', '', '', '', '', '', '0000-00-00', '', 0, 0, 0, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL);