New db schema
This commit is contained in:
parent
9c3173c682
commit
8a39c734fb
1 changed files with 42 additions and 35 deletions
|
|
@ -1,39 +1,39 @@
|
|||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.5.1
|
||||
-- version 4.0.5
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Client: localhost
|
||||
-- Généré le: Mer 09 Octobre 2013 à 23:52
|
||||
-- Version du serveur: 5.5.32-log
|
||||
-- Version de PHP: 5.5.0-pl0-gentoo
|
||||
-- Host: localhost
|
||||
-- Generation Time: Oct 23, 2013 at 07:34 PM
|
||||
-- Server version: 5.1.70-log
|
||||
-- PHP Version: 5.5.4-pl0-gentoo
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
--
|
||||
-- Base de données: `fic2014`
|
||||
-- Database: `fic2014`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `exercices`
|
||||
-- Table structure for table `exercices`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `exercices` (
|
||||
`id` varchar(100) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`id_theme` int(10) unsigned NOT NULL,
|
||||
`require` varchar(100) COLLATE utf16_unicode_ci NOT NULL,
|
||||
`require` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`level` tinyint(4) NOT NULL,
|
||||
`points` smallint(6) NOT NULL,
|
||||
`statement` text COLLATE utf16_unicode_ci NOT NULL,
|
||||
`statement` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `exercice_files`
|
||||
-- Table structure for table `exercice_files`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `exercice_files` (
|
||||
|
|
@ -48,7 +48,7 @@ CREATE TABLE IF NOT EXISTS `exercice_files` (
|
|||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `exercice_keys`
|
||||
-- Table structure for table `exercice_keys`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `exercice_keys` (
|
||||
|
|
@ -62,7 +62,7 @@ CREATE TABLE IF NOT EXISTS `exercice_keys` (
|
|||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `sessions`
|
||||
-- Table structure for table `sessions`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sessions` (
|
||||
|
|
@ -79,7 +79,7 @@ CREATE TABLE IF NOT EXISTS `sessions` (
|
|||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `solved`
|
||||
-- Table structure for table `solved`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `solved` (
|
||||
|
|
@ -88,38 +88,45 @@ CREATE TABLE IF NOT EXISTS `solved` (
|
|||
`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 ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `themes`
|
||||
-- Table structure for table `teams`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `teams` (
|
||||
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`key_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`auth_level` tinyint(1) NOT NULL,
|
||||
`company` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `team_members`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `team_members` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_team` int(10) unsigned NOT NULL,
|
||||
`firstname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`lastname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`nickname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for 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,
|
||||
`filename` varchar(255) COLLATE utf8_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=2 ;
|
||||
|
||||
|
||||
INSERT INTO users (username, password, auth_level)
|
||||
VALUES
|
||||
("nemunaire", UNHEX('c1d050d16d8c90dae6fef376460299aa8d1cce7c5b299720a8e38952a77212f1019e2cd44ba58e0433c01cb4c81ab9a789c07df218b0b9f05af8d1198a3bd239'), 2);
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
|
||||
|
|
|
|||
Reference in a new issue