-- phpMyAdmin SQL Dump
-- version 3.3.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 09, 2011 at 03:34 PM
-- Server version: 5.1.54
-- PHP Version: 5.3.5-1ubuntu7.2

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: 'antop'
--

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

--
-- Table structure for table 'sudoku_grid'
--

CREATE TABLE IF NOT EXISTS sudoku_grid (
  seq int(11) NOT NULL AUTO_INCREMENT,
  grid char(81) NOT NULL,
  created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  modified timestamp NULL DEFAULT NULL,
  PRIMARY KEY (seq)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

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

--
-- Table structure for table 'sudoku_score'
--

CREATE TABLE IF NOT EXISTS sudoku_score (
  seq int(11) NOT NULL AUTO_INCREMENT,
  grid_seq int(11) NOT NULL,
  `name` varchar(30) NOT NULL,
  cost time NOT NULL,
  created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  modified timestamp NULL DEFAULT NULL,
  PRIMARY KEY (seq),
  KEY grid_seq (grid_seq)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `sudoku_score`
--
ALTER TABLE `sudoku_score`
  ADD CONSTRAINT sudoku_score_ibfk_1 FOREIGN KEY (grid_seq) REFERENCES sudoku_grid (seq) ON DELETE CASCADE ON UPDATE CASCADE;
