New revision of the DB
This commit is contained in:
parent
d1989c59b5
commit
159aa63e9b
@ -3,7 +3,7 @@
|
|||||||
-- http://www.phpmyadmin.net
|
-- http://www.phpmyadmin.net
|
||||||
--
|
--
|
||||||
-- Client: localhost
|
-- Client: localhost
|
||||||
-- Généré le: Mer 09 Octobre 2013 à 18:26
|
-- Généré le: Mer 09 Octobre 2013 à 23:12
|
||||||
-- Version du serveur: 5.5.32-log
|
-- Version du serveur: 5.5.32-log
|
||||||
-- Version de PHP: 5.5.0-pl0-gentoo
|
-- Version de PHP: 5.5.0-pl0-gentoo
|
||||||
|
|
||||||
@ -21,24 +21,40 @@ SET time_zone = "+00:00";
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `exercices` (
|
CREATE TABLE IF NOT EXISTS `exercices` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` varchar(100) COLLATE utf16_unicode_ci NOT NULL,
|
||||||
`id_theme` int(10) unsigned NOT NULL,
|
`id_theme` int(10) unsigned NOT NULL,
|
||||||
|
`require` varchar(100) COLLATE utf16_unicode_ci NOT NULL,
|
||||||
|
`level` tinyint(4) NOT NULL,
|
||||||
`points` smallint(6) NOT NULL,
|
`points` smallint(6) NOT NULL,
|
||||||
|
`statement` text COLLATE utf16_unicode_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Structure de la table `exercice_dependancies`
|
-- Structure de la table `exercice_files`
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `exercice_dependancies` (
|
CREATE TABLE IF NOT EXISTS `exercice_files` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`id_exercice` int(10) unsigned NOT NULL,
|
`path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`id_dependence` int(10) unsigned NOT NULL,
|
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
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 `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 ;
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@ -51,11 +67,11 @@ CREATE TABLE IF NOT EXISTS `sessions` (
|
|||||||
`uid` binary(16) NOT NULL,
|
`uid` binary(16) NOT NULL,
|
||||||
`time` int(11) NOT NULL,
|
`time` int(11) NOT NULL,
|
||||||
`ip` varbinary(16) NOT NULL,
|
`ip` varbinary(16) NOT NULL,
|
||||||
`var` varchar(9999) COLLATE utf16_unicode_ci NOT NULL,
|
`var` varchar(9999) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`level` tinyint(2) NOT NULL,
|
`level` tinyint(2) NOT NULL,
|
||||||
`active` enum('1','0') COLLATE utf16_unicode_ci NOT NULL,
|
`active` enum('1','0') COLLATE utf8_unicode_ci NOT NULL,
|
||||||
PRIMARY KEY (`session`)
|
PRIMARY KEY (`session`)
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci;
|
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
@ -98,4 +114,9 @@ CREATE TABLE IF NOT EXISTS `users` (
|
|||||||
`lastname` 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,
|
`company` varchar(255) COLLATE utf16_unicode_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=1 ;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_unicode_ci AUTO_INCREMENT=2 ;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO users (username, password, auth_level)
|
||||||
|
VALUES
|
||||||
|
("nemunaire", UNHEX('c1d050d16d8c90dae6fef376460299aa8d1cce7c5b299720a8e38952a77212f1019e2cd44ba58e0433c01cb4c81ab9a789c07df218b0b9f05af8d1198a3bd239'), 2);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<!ELEMENT title (#PCDATA)>
|
<!ELEMENT title (#PCDATA)>
|
||||||
|
|
||||||
<!ELEMENT exercice (title,points,(statement|key|file*))>
|
<!ELEMENT exercice (title,points,statement,key+,file*)>
|
||||||
<!ATTLIST exercice id ID #REQUIRED>
|
<!ATTLIST exercice id ID #REQUIRED>
|
||||||
<!ATTLIST exercice level (sandbox|easy|simple|medium|hard|extrem) #REQUIRED>
|
<!ATTLIST exercice level (sandbox|easy|simple|medium|hard|extrem) #REQUIRED>
|
||||||
<!ATTLIST exercice depends IDREFS #IMPLIED>
|
<!ATTLIST exercice depends IDREFS #IMPLIED>
|
||||||
@ -14,5 +14,7 @@
|
|||||||
<!ELEMENT statement (#PCDATA)>
|
<!ELEMENT statement (#PCDATA)>
|
||||||
|
|
||||||
<!ELEMENT key (#PCDATA)>
|
<!ELEMENT key (#PCDATA)>
|
||||||
|
<!ATTLIST key format (raw|md5|sha1|sha256|sha512|whirlpool) "sha512">
|
||||||
|
|
||||||
<!ELEMENT file (#PCDATA)>
|
<!ELEMENT file (#PCDATA)>
|
||||||
|
<!ATTLIST file path CDATA #REQUIRED>
|
||||||
|
Loading…
Reference in New Issue
Block a user