-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 13, 2011 at 11:50 AM
-- Server version: 5.5.16
-- PHP Version: 5.4.0beta2-dev

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--SET time_zone = "+00:00";


/*!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: `adeptive_mathdox`
--

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

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

CREATE TABLE IF NOT EXISTS `user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_login` varchar(255) DEFAULT NULL,
  `user_password` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `user_login` (`user_login`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `user_variable`
--

CREATE TABLE IF NOT EXISTS `user_variable` (
  `user_variable_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_variable_user_id` int(11) DEFAULT NULL,
  `user_variable_variable_id` int(11) DEFAULT NULL,
  `user_variable_value` int(11) DEFAULT NULL,
  PRIMARY KEY (`user_variable_id`),
  KEY `user_variable_user_id` (`user_variable_user_id`),
  KEY `user_variable_variable_id` (`user_variable_variable_id`),
  UNIQUE KEY `user_variable_user_variable` (`user_variable_user_id`, `user_variable_variable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `variable`
--

CREATE TABLE IF NOT EXISTS `variable` (
  `variable_id` int(11) NOT NULL AUTO_INCREMENT,
  `variable_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`variable_id`),
  UNIQUE KEY `variable_name` (`variable_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `user_variable`
--
ALTER TABLE `user_variable`
  ADD CONSTRAINT `user_variable_ibfk_1` FOREIGN KEY (`user_variable_user_id`) REFERENCES `user` (`user_id`),
  ADD CONSTRAINT `user_variable_ibfk_2` FOREIGN KEY (`user_variable_variable_id`) REFERENCES `variable` (`variable_id`);

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