DROP TABLE IF EXISTS wbusergroupmessage;
CREATE TABLE `wbusergroupmessage` (
  `pugmsgid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) unsigned NOT NULL DEFAULT '0',
  `gid` int(11) unsigned NOT NULL DEFAULT '0',
  `title` varchar(255) NOT NULL DEFAULT '',
  `body` text NOT NULL DEFAULT '',
  `created` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  `changed` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  `enabled` tinyint(4) NOT NULL DEFAULT '0',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pugmsgid`)
) ENGINE=MyISAM AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COMMENT='Wombat user group messages';

DROP TABLE IF EXISTS wbusergroupmessageuser;
CREATE TABLE `wbusergroupmessageuser` (
  `pugmsgid` int(11) unsigned NOT NULL,
  `uid` int(11) unsigned NOT NULL,
  `created` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  `confirmed` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
  PRIMARY KEY (`pugmsgid`, `uid`)
) ENGINE=MyISAM AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COMMENT='Wombat user group message for each user';

DROP TABLE IF EXISTS wbusergroupmessagemedia;
CREATE TABLE `wbusergroupmessagemedia` (
  `pugmsgid` int(11) unsigned NOT NULL,
  `vfsfid` int(11) unsigned NOT NULL,
   KEY (`pugmsgid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Wombat user group message attachments';
