-- phpMyAdmin SQL Dump
-- version 3.3.8.1
-- http://www.phpmyadmin.net
--
-- Host: db2838.perfora.net
-- Generation Time: Mar 15, 2011 at 07:14 PM
-- Server version: 5.0.91
-- PHP Version: 5.2.17

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `db358894438`
--

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

--
-- Table structure for table `mapOfTheDay`
--

CREATE TABLE `mapOfTheDay` (
  `ID` int(11) NOT NULL auto_increment,
  `mapID` int(11) NOT NULL,
  `mapType` tinyint(4) NOT NULL,
  `mapDate` date NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `maps`
--

CREATE TABLE `maps` (
  `ID` int(11) NOT NULL auto_increment,
  `code` varchar(512) collate latin1_general_ci NOT NULL,
  `dateCreated` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `solutions`
--

CREATE TABLE `solutions` (
  `ID` int(11) NOT NULL auto_increment,
  `userID` int(11) NOT NULL,
  `mapID` int(11) NOT NULL,
  `solution` varchar(128) collate latin1_general_ci NOT NULL,
  `moves` int(11) NOT NULL,
  `dateModified` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`),
  KEY `userID` (`userID`,`mapID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `ID` int(11) NOT NULL auto_increment,
  `openID` varchar(255) collate latin1_general_ci NOT NULL,
  `email` varchar(128) collate latin1_general_ci NOT NULL,
  `displayName` varchar(64) collate latin1_general_ci NOT NULL,
  `dateLogin` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `dateJoined` timestamp NOT NULL default '0000-00-00 00:00:00',
  `isAdmin` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `openID` (`openID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
