-- netnews link table -- links a node type or a forum container to a newsgroup -- synchmethod has the following meaning: CREATE TABLE {netnews_links} ( nngid int(10) unsigned NOT NULL auto_increment, -- name: symbolic name for news server name varchar(32) NOT NULL, -- -- active has the following meaning: -- 0: not active -- 1: active active tinyint(2) NOT NULL default 1, -- linktype has the following meaning: -- 0: linked to forum container/category (tid contains link) -- 1: linked to node type (defined in field type) -- 2: all forums below specified container, use taxonomy to build groupname linktype tinyint(2) NOT NULL default 0, -- type: node type type varchar(16) NOT NULL default 'forum', -- taxonomy term id identifying a forum/category tid int(10) unsigned NOT NULL default 0, -- servername: domain name or IP of nntp server servername varchar(255) NOT NULL default '', -- serverport: post to be used for the nntp server serverport int(10) unsigned NOT NULL default 119, -- authmethod: how should we authenticate? -- 0: no authentication -- 1: authenticate with user/passwd in this table entry -- 2: authenticate as user authmethod tinyint(2) unsigned NOT NULL default 0, authuser varchar(64) NOT NULL default '', authpasswd varchar(64) NOT NULL default '', -- groupname: full pathname of group, e.g. comp.lang.php.moderated groupname varchar(255) NOT NULL default '', -- synchmethod: 0: two way synch, 1: drupal -> nntp, 2: nntp -> drupal synchmethod tinyint(2) unsigned NOT NULL default 0, -- lastmsg: number of last message read from the news server lastmsg int(10) unsigned NOT NULL default 0, -- oldmsgs: max number of old messages to retrieve when the first -- import from the news server runs oldmsgs int(10) unsigned NOT NULL default 0, -- maximum number of messages to retrieve from the news server in one synch maxmsgs int(10) unsigned NOT NULL default 0, -- fullthreads indicates whether a synch must include messages older than -- synchfrom and/or in excess of maxsynch in order to have complete threads -- TODO: implement or remove fullthreads tinyint(2) NOT NULL default 0, -- Whether to treat this group as binary -- (affects assumptions about whitespace) isbinary tinyint(2) DEFAULT 0, -- Whether to create taxonomy classifications on the fly autotaxonomy tinyint(2) DEFAULT 0, -- usermethod: -- 0: create a user for every unique nntp poster -- 1: use a specified user that will own all messages with nntp origin usermethod tinyint(2) NOT NULL default 0, username varchar(60) NOT NULL default '', PRIMARY KEY (nngid), UNIQUE KEY name (name) ); -- netnews message table -- links a nid (or nid + cid) to an NNTP message-ID CREATE TABLE {netnews_messages} ( nnid int(10) unsigned NOT NULL auto_increment, -- nid: node id nid int(10) unsigned NOT NULL, -- nngid: news group id (table netnews_links) nngid int(10) unsigned NOT NULL, -- msgid: nntp message-ID msgid varchar(128) NOT NULL default '', -- msgnum: nntp message number msgnum int(10) unsigned NOT NULL default 0, -- drupalid: X-Drupal-ID drupalid varchar(128) NOT NULL default '', -- status has the following meaning: -- 0: newly added, not sent to newsserver -- 1: failed to be sent to newsserver (should be retried) -- 2: succesfully sent to newsserver -- 3 and up: do not send to newsserver status tinyint(2) NOT NULL default 0, -- origin has the following meaning: -- 0: originated in drupal -- 1: originated in newsserver origin tinyint(2) NOT NULL default 0, -- synch: is not used, TODO: remove synch tinyint(2) NOT NULL default 0, -- cid: comment id -- pid: parent comment id cid int(10) unsigned NOT NULL default 0, pid int(10) unsigned NOT NULL default 0, -- uid: user id uid int(10) unsigned NOT NULL default 0, PRIMARY KEY (nnid), KEY (nid), KEY status (status), KEY cid (cid), KEY pid (pid), KEY msgid (msgid), KEY drupalid (drupalid) ); -- netnews_new: -- nngid, nid, cid, tid, msgid, origin, status, sessionid, uid -- netnews_archive -- nid, cid, msgid