CREATE TABLE mgw_todo (
  id INTEGER NOT NULL default '0',
  userid INTEGER NOT NULL default '0',
  header CHARACTER VARYING(200) NOT NULL default '',
  description TEXT NOT NULL,
  enddate TIMESTAMP NOT NULL,
  endtype CHAR(1) default '1',
  priority CHAR(1) default '3',
  status CHARACTER VARYING(4) NOT NULL default '',
  fromuserid INTEGER default NULL,
  owner INTEGER default NULL,
  lu_user INTEGER NOT NULL default '0',
  lu_date TIMESTAMP NOT NULL,
  projectid INTEGER NOT NULL default '0',
  PRIMARY KEY  (id)
);

INSERT INTO mgw_configtags VALUES ('todos_per_page','todo','how many contacts to display before paging occurs',0,0,'int',1,'2002-01-01');
INSERT INTO mgw_configtags VALUES ('todo_orderby','todo','default order of todos',0,0,'str',1,'2002-01-01');
INSERT INTO mgw_configtags VALUES ('todo_order_dir','todo','order asc or desc',0,0,'str',1,'2002-01-01');
INSERT INTO mgw_configtags VALUES ('todo_merged','todo','showin todos merged',0,0,'int',1,'2002-01-01');
INSERT INTO mgw_configtags VALUES ('todo_emaildelegade','todo','mailing delegaded todos',0,0,'int',1,'2002-01-01');

INSERT INTO mgw_config VALUES (0,'todos_per_page',1,'',10,'',1,'2002-01-01');
