server/db/fic2014.sql

123 lines
3.7 KiB
MySQL
Raw Normal View History

2013-10-09 13:40:23 +00:00
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
2013-10-09 18:27:45 +00:00
-- Client: localhost
2013-10-09 23:15:24 +00:00
-- Généré le: Mer 09 Octobre 2013 à 23:12
2013-10-09 18:27:45 +00:00
-- Version du serveur: 5.5.32-log
-- Version de PHP: 5.5.0-pl0-gentoo
2013-10-09 13:40:23 +00:00
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
2013-10-09 18:27:45 +00:00
-- Base de données: `fic2014`
2013-10-09 13:40:23 +00:00
--
-- --------------------------------------------------------
--
2013-10-09 18:27:45 +00:00
-- Structure de la table `exercices`
2013-10-09 13:40:23 +00:00
--
CREATE TABLE IF NOT EXISTS `exercices` (
2013-10-09 23:15:24 +00:00
`id` varchar(100) COLLATE utf16_unicode_ci NOT NULL,
2013-10-09 13:40:23 +00:00
`id_theme` int(10) unsigned NOT NULL,
2013-10-09 23:15:24 +00:00
`require` varchar(100) COLLATE utf16_unicode_ci NOT NULL,
`level` tinyint(4) NOT NULL,
2013-10-09 13:40:23 +00:00
`points` smallint(6) NOT NULL,
2013-10-09 23:15:24 +00:00
`statement` text COLLATE utf16_unicode_ci NOT NULL,
2013-10-09 13:40:23 +00:00
PRIMARY KEY (`id`)
2013-10-09 23:15:24 +00:00
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
2013-10-09 13:40:23 +00:00
-- --------------------------------------------------------
--
2013-10-09 23:15:24 +00:00
-- Structure de la table `exercice_files`
2013-10-09 13:40:23 +00:00
--
2013-10-09 23:15:24 +00:00
CREATE TABLE IF NOT EXISTS `exercice_files` (
2013-10-09 13:40:23 +00:00
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2013-10-09 23:15:24 +00:00
`path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
2013-10-09 13:40:23 +00:00
PRIMARY KEY (`id`)
2013-10-09 23:15:24 +00:00
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Structure de la table `exercice_keys`
--
CREATE TABLE IF NOT EXISTS `exercice_keys` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`format` enum('raw','md5','sha1','sha256','sha512','whirlpool') COLLATE utf8_unicode_ci NOT NULL,
`value` varbinary(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
2013-10-09 13:40:23 +00:00
-- --------------------------------------------------------
--
2013-10-09 18:27:45 +00:00
-- Structure de la table `sessions`
2013-10-09 13:40:23 +00:00
--
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,
2013-10-09 23:15:24 +00:00
`var` varchar(9999) COLLATE utf8_unicode_ci NOT NULL,
2013-10-09 13:40:23 +00:00
`level` tinyint(2) NOT NULL,
2013-10-09 23:15:24 +00:00
`active` enum('1','0') COLLATE utf8_unicode_ci NOT NULL,
2013-10-09 13:40:23 +00:00
PRIMARY KEY (`session`)
2013-10-09 23:15:24 +00:00
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2013-10-09 13:40:23 +00:00
-- --------------------------------------------------------
--
2013-10-09 18:27:45 +00:00
-- Structure de la table `solved`
2013-10-09 13:40:23 +00:00
--
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 ;
-- --------------------------------------------------------
--
2013-10-09 18:27:45 +00:00
-- Structure de la table `themes`
2013-10-09 13:40:23 +00:00
--
CREATE TABLE IF NOT EXISTS `themes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
2013-10-09 18:27:45 +00:00
`filename` varchar(255) COLLATE utf16_unicode_ci NOT NULL,
2013-10-09 13:40:23 +00:00
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
2013-10-09 18:27:45 +00:00
-- Structure de la table `users`
2013-10-09 13:40:23 +00:00
--
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,
2013-10-09 18:27:45 +00:00
`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,
2013-10-09 13:40:23 +00:00
PRIMARY KEY (`id`)
2013-10-09 23:15:24 +00:00
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=2 ;
INSERT INTO users (username, password, auth_level)
VALUES
("nemunaire", UNHEX('c1d050d16d8c90dae6fef376460299aa8d1cce7c5b299720a8e38952a77212f1019e2cd44ba58e0433c01cb4c81ab9a789c07df218b0b9f05af8d1198a3bd239'), 2);