server/db/fic2014.sql
2013-10-09 20:27:45 +02:00

102 lines
2.9 KiB
SQL

-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Client: localhost
-- Généré le: Mer 09 Octobre 2013 à 18:26
-- Version du serveur: 5.5.32-log
-- Version de PHP: 5.5.0-pl0-gentoo
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données: `fic2014`
--
-- --------------------------------------------------------
--
-- Structure de la table `exercices`
--
CREATE TABLE IF NOT EXISTS `exercices` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_theme` int(10) unsigned NOT NULL,
`points` smallint(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Structure de la table `exercice_dependancies`
--
CREATE TABLE IF NOT EXISTS `exercice_dependancies` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_exercice` int(10) unsigned NOT NULL,
`id_dependence` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Structure de la table `sessions`
--
CREATE TABLE IF NOT EXISTS `sessions` (
`session` binary(32) NOT NULL,
`uid` binary(16) NOT NULL,
`time` int(11) NOT NULL,
`ip` varbinary(16) NOT NULL,
`var` varchar(9999) COLLATE utf16_unicode_ci NOT NULL,
`level` tinyint(2) NOT NULL,
`active` enum('1','0') COLLATE utf16_unicode_ci NOT NULL,
PRIMARY KEY (`session`)
) ENGINE=MEMORY DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
-- --------------------------------------------------------
--
-- Structure de la table `solved`
--
CREATE TABLE IF NOT EXISTS `solved` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_user` int(10) unsigned NOT NULL,
`id_exercice` int(10) unsigned NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Structure de la table `themes`
--
CREATE TABLE IF NOT EXISTS `themes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`filename` varchar(255) COLLATE utf16_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf16_unicode_ci NOT NULL,
`password` binary(64) NOT NULL,
`auth_level` tinyint(1) NOT NULL,
`firstname` varchar(255) COLLATE utf16_unicode_ci NOT NULL,
`lastname` varchar(255) COLLATE utf16_unicode_ci NOT NULL,
`company` varchar(255) COLLATE utf16_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;