## +----------------------------------------------------------------------+
## | OpenConf                                                             |
## +----------------------------------------------------------------------+
## | Copyright (c) 2002-2007 Zakon Group LLC.  All Rights Reserved.       |
## +----------------------------------------------------------------------+
## | This source file is subject to the OpenConf license, that is bundled |
## | with this package in the file LICENSE, and is available at:          |
## | http://www.zakongroup.com/technology/openconf-license.shtml          |
## +----------------------------------------------------------------------+


# --------------------------------------------------------

#
# Table structure for table `author`
#

CREATE TABLE `author` (
  `paperid` smallint(4) unsigned NOT NULL default '0',
  `position` tinyint(1) unsigned NOT NULL default '0',
  `name_last` varchar(40) NOT NULL default '',
  `name_first` varchar(60) NOT NULL default '',
  `organization` varchar(255) default NULL,
  `country` varchar(100) default NULL,
  `email` varchar(100) default NULL,
  PRIMARY KEY  (`paperid`,`position`),
  KEY `organization` (`organization`),
  KEY `email` (`email`)
) ;

# --------------------------------------------------------

#
# Table structure for table `conflict`
#

CREATE TABLE `conflict` (
  `paperid` smallint(4) unsigned NOT NULL default '0',
  `reviewerid` smallint(4) unsigned NOT NULL default '0',
  PRIMARY KEY  (`paperid`,`reviewerid`)
) ;

# --------------------------------------------------------

#
# Table structure for table `paper`
#

CREATE TABLE `paper` (
  `paperid` smallint(4) unsigned NOT NULL auto_increment,
  `accepted` enum('T','F') default NULL,
  `password` varchar(255) default NULL,
  `title` varchar(255) NOT NULL default '',
  `student` enum('T','F') NOT NULL default 'F',
  `contactid` tinyint(1) unsigned NOT NULL default '0',
  `contactemail` varchar(100) NOT NULL default '',
  `contactphone` varchar(30) default NULL,
  `submissiondate` date NOT NULL default '0000-00-00',
  `lastupdate` date default NULL,
  `format` varchar(10) default NULL,
  `otherauthors` text,
  `keywords` text,
  `comments` text,
  `abstract` text,
  `pcnotes` text,
  PRIMARY KEY  (`paperid`),
  KEY `accepted` (`accepted`)
) AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `paperadvocate`
#

CREATE TABLE `paperadvocate` (
  `paperid` smallint(4) unsigned NOT NULL default '0',
  `advocateid` smallint(4) unsigned NOT NULL default '0',
  `adv_recommendation` enum('Accept','Reject','Unsure') default NULL,
  `adv_comments` text,
  PRIMARY KEY  (`paperid`,`advocateid`)
) ;

# --------------------------------------------------------

#
# Table structure for table `paperreviewer`
#

CREATE TABLE `paperreviewer` (
  `paperid` smallint(4) unsigned NOT NULL default '0',
  `reviewerid` smallint(4) unsigned NOT NULL default '0',
  `completed` enum('T','F') NOT NULL default 'F',
  `updated` date default NULL,
  `recommendation` tinyint(1) unsigned default NULL,
  `category` tinyint(1) unsigned default NULL,
  `value` varchar(20) default NULL,
  `familiar` enum('High','Low','Moderate') default NULL,
  `bpcandidate` enum('Yes','No','Unsure') default NULL,
  `length` enum('Yes','No','Unsure') default NULL,
  `difference` tinyint(1) unsigned default NULL,
  `pccomments` text,
  `authorcomments` text,
  PRIMARY KEY  (`paperid`,`reviewerid`),
  KEY `completed` (`completed`)
) ;

# --------------------------------------------------------

#
# Table structure for table `papersession`
#

CREATE TABLE `papersession` (
  `paperid` smallint(4) unsigned NOT NULL default '0',
  `reviewerid` smallint(4) unsigned NOT NULL default '0',
  `topicid` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`paperid`,`reviewerid`,`topicid`)
) ;

# --------------------------------------------------------

#
# Table structure for table `papertopic`
#

CREATE TABLE `papertopic` (
  `paperid` smallint(4) unsigned NOT NULL default '0',
  `topicid` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`paperid`,`topicid`)
) ;

# --------------------------------------------------------

#
# Table structure for table `reviewer`
#

CREATE TABLE `reviewer` (
  `reviewerid` smallint(4) unsigned NOT NULL auto_increment,
  `username` varchar(255) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  `name_last` varchar(40) NOT NULL default '',
  `name_first` varchar(60) NOT NULL default '',
  `email` varchar(100) NOT NULL default '',
  `url` varchar(255) default NULL,
  `organization` varchar(255) default NULL,
  `country` varchar(100) default NULL,
  `telephone` varchar(30) default NULL,
  `onprogramcommittee` enum('T','F') NOT NULL default 'F',
  `otherexpertise` text,
  `comments` text,
  PRIMARY KEY  (`reviewerid`),
  KEY `onprogramcommittee` (`onprogramcommittee`),
  KEY `email` (`email`),
  KEY `organization` (`organization`)
) AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `reviewertopic`
#

CREATE TABLE `reviewertopic` (
  `reviewerid` smallint(4) unsigned NOT NULL default '0',
  `topicid` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`reviewerid`,`topicid`)
) ;

# --------------------------------------------------------

#
# Table structure for table `topic`
#

CREATE TABLE `topic` (
  `topicid` tinyint(3) unsigned NOT NULL default '0',
  `topicname` varchar(255) NOT NULL default '',
  `short` varchar(20) default NULL,
  PRIMARY KEY  (`topicid`)
) ;

