DROP TABLE IF EXISTS paper;
CREATE TABLE paper (
  pid int(11) NOT NULL,
  title varchar(255) default NULL,
  paid enum('yes','no') default 'no',
  copyright enum('yes','no') default 'no',
  cameraReady enum('yes','no') default 'no',
  PRIMARY KEY  (pid)
);

DROP TABLE IF EXISTS author;
CREATE TABLE author (
  pid int(11) NOT NULL,
  aname varchar(255) NOT NULL default '',
  PRIMARY KEY  (pid,aname)
);

DROP TABLE IF EXISTS banquet;
CREATE TABLE banquet (
  rid int(11) NOT NULL,
  meal varchar(255) default NULL,
  meal1 varchar(255) default NULL,
  meal2 varchar(255) default NULL,
  meal3 varchar(255) default NULL,
  PRIMARY KEY  (rid)
);

DROP TABLE IF EXISTS dinner;
CREATE TABLE dinner (
  rid int(11) NOT NULL,
  meal varchar(255) default NULL,
  meal1 varchar(255) default NULL,
  meal2 varchar(255) default NULL,
  meal3 varchar(255) default NULL,
  PRIMARY KEY  (rid)
);

DROP TABLE IF EXISTS reg;
CREATE TABLE reg (
  rid int(11) NOT NULL auto_increment,
  salutation varchar(255) default NULL,
  fname varchar(255) default NULL,
  lname varchar(255) default NULL,
  institution varchar(255) default NULL,
  saddr1 varchar(255) default NULL,
  saddr2 varchar(255) default NULL,
  city varchar(255) default NULL,
  state varchar(255) default NULL,
  zip varchar(255) default NULL,
  country varchar(255) default NULL,
  phone varchar(255) default NULL,
  fax varchar(255) default NULL,
  email varchar(255) NOT NULL,
  pid int(11) default NULL,
  regtype varchar(255) default NULL,
  extrabanquet int(11) default '0',
  extradinner int(11) default '0',
  roomtype varchar(255) default NULL,
  shuttle1 tinyint(1) default '0',
  shuttle2 tinyint(1) default '0',
  PRIMARY KEY  (rid)
);

DROP TABLE IF EXISTS room;
CREATE TABLE room (
  rid int(11) NOT NULL,
  roomdate int(11) NOT NULL
);

DROP TABLE IF EXISTS payment;
CREATE TABLE payment (
  tid varchar(255) NOT NULL,
  rid int(11) NOT NULL,
  pid int(11) default NULL,
  amount int(11) NOT NULL,
  payer_email varchar(255) default NULL,
  paytime timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY (tid)
);

