-- phpMyAdmin SQL Dump
-- version 3.3.8.1
-- http://www.phpmyadmin.net
--
-- Host: db2894.perfora.net
-- Generation Time: Jul 18, 2012 at 01:46 AM
-- Server version: 5.0.95
-- 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: `db362854667`
--

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

--
-- Table structure for table `achievements`
--

CREATE TABLE IF NOT EXISTS `achievements` (
  `ID` int(11) NOT NULL auto_increment,
  `userID` int(11) NOT NULL,
  `type` smallint(6) NOT NULL,
  `level` smallint(6) NOT NULL,
  `notified` tinyint(1) NOT NULL default '0',
  `dateCompleted` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`),
  KEY `userID` (`userID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=65 ;

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

--
-- Table structure for table `guestSolutions`
--

CREATE TABLE IF NOT EXISTS `guestSolutions` (
  `ID` int(11) NOT NULL,
  `mapID` int(11) NOT NULL,
  `identifier` varchar(64) collate latin1_general_ci NOT NULL,
  `IP` int(11) NOT NULL,
  `displayName` varchar(32) collate latin1_general_ci NOT NULL,
  `solution` varchar(512) collate latin1_general_ci NOT NULL,
  `moves` int(11) NOT NULL,
  `dateModified` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`),
  KEY `mapID` (`mapID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

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

CREATE TABLE IF NOT EXISTS `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`),
  UNIQUE KEY `UniqueTypeDate` (`mapType`,`mapDate`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=758 ;

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

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

CREATE TABLE IF NOT EXISTS `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=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=761 ;

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

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

CREATE TABLE IF NOT EXISTS `solutions` (
  `ID` int(11) NOT NULL auto_increment,
  `userID` int(11) NOT NULL,
  `mapID` int(11) NOT NULL,
  `solution` varchar(512) 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=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=431 ;

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

--
-- Table structure for table `statistics`
--

CREATE TABLE IF NOT EXISTS `statistics` (
  `ID` int(11) NOT NULL auto_increment,
  `userID` int(11) NOT NULL,
  `type` smallint(6) NOT NULL,
  `value` int(11) NOT NULL,
  PRIMARY KEY  (`ID`),
  KEY `userID` (`userID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=30 ;

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

--
-- Table structure for table `unlocks`
--

CREATE TABLE IF NOT EXISTS `unlocks` (
  `ID` int(11) NOT NULL auto_increment,
  `userID` int(11) NOT NULL,
  `achievementID` int(11) NOT NULL,
  `type` smallint(6) NOT NULL,
  `subtype` tinyint(4) NOT NULL default '0',
  `name` varchar(128) collate latin1_general_ci NOT NULL,
  `value` varchar(128) collate latin1_general_ci NOT NULL,
  `dateUnlocked` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ID`),
  KEY `userID` (`userID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=65 ;

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

--
-- Table structure for table `userData`
--

CREATE TABLE IF NOT EXISTS `userData` (
  `userID` int(11) NOT NULL,
  `displayColor` varchar(7) collate latin1_general_ci NOT NULL,
  `wallColor` varchar(7) collate latin1_general_ci NOT NULL,
  `wallEmblem` varchar(64) collate latin1_general_ci NOT NULL,
  PRIMARY KEY  (`userID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

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

CREATE TABLE IF NOT EXISTS `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=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=20 ;
