
/**
 * project manager stuff
 */


DROP TABLE IF EXISTS `wbsohocustomer`;
CREATE TABLE `wbsohocustomer` (
  `customerid` int(255) NOT NULL auto_increment,
  `customer` varchar(255) NOT NULL default '',
  `customerdescription` text NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `changed` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL default 0,
  PRIMARY KEY  (`customerid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='customer';

DROP TABLE IF EXISTS `wbsohoproject`;
CREATE TABLE `wbsohoproject` (
  `projectid` int(255) NOT NULL auto_increment,
  `customerid` varchar(255) NOT NULL default '0',
  `project` varchar(255) NOT NULL default '',
  `projectdescription` text NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `changed` datetime NOT NULL,
  `active` tinyint(1) NOT NULL default 1,  
  `deleted` tinyint(1) NOT NULL default 0,
  PRIMARY KEY  (`projectid`),
  KEY ( `projectid` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='projects of customer';

DROP TABLE IF EXISTS `wbsohoeffort`;
CREATE TABLE `wbsohoeffort` (
  `effortid` int(255) NOT NULL auto_increment,
  `uid` varchar(255) NOT NULL default '0',
  `projectid` varchar(255) NOT NULL default '0',
  `planedmin` float NOT NULL default -1,
  `planedmax` float NOT NULL default -1,
  `actual` float NOT NULL default -1,
  `description` text NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `changed` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL default 0,
  PRIMARY KEY  (`effortid`),
  KEY ( `projectid` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='efforts';

DROP TABLE IF EXISTS `wbsohoinvoice`;
CREATE TABLE `wbsohoinvoice` (
  `invoiceid` int(255) NOT NULL auto_increment,
  `uid` varchar(255) NOT NULL default '0',
  `description` text NOT NULL default '',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `changed` datetime NOT NULL,
  `deleted` tinyint(1) NOT NULL default 0,
  PRIMARY KEY  (`invoiceid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='invoices';

DROP TABLE IF EXISTS `wbsohoinvoiceeffort`;
CREATE TABLE `wbsohoinvoiceeffort` (
  `invoiceid` int(255) NOT NULL,
  `effortid` int(255) NOT NULL,
  `changed` datetime NOT NULL default '0000-00-00 00:00:00',
  KEY  (`invoiceid`),
  KEY  (`effortid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='efforts mapped to invoices';

