-- phpMyAdmin SQL Dump
-- version 2.8.0.3
-- http://www.phpmyadmin.net
-- 
-- Host: mysql.catchyourhare.com
-- Generation Time: Sep 20, 2006 at 12:57 PM
-- Server version: 5.0.18
-- PHP Version: 4.4.2
-- 
-- Database: `dbtestbed`
-- 
CREATE DATABASE `dbtestbed` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `dbtestbed`;

-- --------------------------------------------------------

-- 
-- Table structure for table `compatibility`
-- 

CREATE TABLE `compatibility` (
  `compatibilityid` int(11) NOT NULL auto_increment,
  `gameid` int(11) NOT NULL,
  `name` text NOT NULL,
  `compatibilitydicetoaward` tinyint(4) NOT NULL default '2',
  `invocationstatus` enum('proposed','available') NOT NULL default 'available',
  PRIMARY KEY  (`compatibilityid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `game`
-- 

CREATE TABLE `game` (
  `gameid` int(4) NOT NULL auto_increment,
  `dateno` tinyint(4) NOT NULL default '0',
  `turn` tinyint(4) NOT NULL default '0',
  `attractiondicetoaward` tinyint(4) NOT NULL default '1',
  `bonusdicetoaward` tinyint(4) NOT NULL default '3',
  `rerollablediceawarded` tinyint(4) NOT NULL default '0',
  `singlerolldiceawarded` tinyint(4) NOT NULL default '0',
  `rerollablesuccesses` tinyint(4) NOT NULL default '0',
  `singlerollsuccesses` tinyint(4) NOT NULL default '0',
  `rerolls` tinyint(4) NOT NULL default '0',
  `singlerollfailures` tinyint(4) NOT NULL default '0',
  `rerollfailures` tinyint(4) NOT NULL default '0',
  `temporaryattraction` tinyint(4) NOT NULL default '0',
  `permanentattraction` tinyint(4) NOT NULL default '1',
  `permanencedice` tinyint(4) NOT NULL,
  `permanencesuccesses` tinyint(4) NOT NULL,
  `permanencererolls` tinyint(4) unsigned NOT NULL default '0',
  `permanencefailures` tinyint(4) unsigned NOT NULL default '0',
  `betweendates` tinyint(1) NOT NULL default '0',
  `switch` text NOT NULL,
  `timelastactive` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`gameid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=65 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `gameusermap`
-- 

CREATE TABLE `gameusermap` (
  `gameusermapid` int(4) NOT NULL auto_increment,
  `userid` int(4) NOT NULL,
  `gameid` int(4) NOT NULL,
  `invitationstatus` enum('unconfirmed','willing','refused','playing','finished') NOT NULL default 'unconfirmed',
  `conflict` text NOT NULL,
  `conflictdicetoaward` tinyint(4) NOT NULL default '3',
  `invocationstatus` enum('proposed','available') NOT NULL default 'available',
  `charactername` text NOT NULL,
  `switchstatus` enum('none','willing') NOT NULL default 'none',
  PRIMARY KEY  (`gameusermapid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=129 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `trait`
-- 

CREATE TABLE `trait` (
  `traitid` int(11) NOT NULL auto_increment,
  `gameusermapid` int(11) NOT NULL,
  `name` text NOT NULL,
  PRIMARY KEY  (`traitid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=223 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `user`
-- 

CREATE TABLE `user` (
  `userid` int(4) NOT NULL auto_increment,
  `name` varchar(25) NOT NULL,
  `contact` text NOT NULL,
  `timelastactive` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `hidden` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=44 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `webitem`
-- 

CREATE TABLE `webitem` (
  `webitemid` int(4) NOT NULL auto_increment,
  `previouswebitemid` int(4) NOT NULL,
  `name` text NOT NULL,
  `userid` int(4) NOT NULL,
  `gameid` int(11) NOT NULL,
  PRIMARY KEY  (`webitemid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=408 ;
