-- phpMyAdmin SQL Dump -- version 4.0.5 -- http://www.phpmyadmin.net -- -- 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 time_zone = "+00:00"; -- -- Database: `fic2014` -- -- -------------------------------------------------------- -- -- Table structure for table `exercices` -- CREATE TABLE IF NOT EXISTS `exercices` ( `id` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `id_theme` int(10) unsigned NOT NULL, `require` varchar(100) COLLATE utf8_unicode_ci NULL, `level` tinyint(4) NOT NULL, `points` smallint(6) NOT NULL, `statement` text COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `exercice_files` -- CREATE TABLE IF NOT EXISTS `exercice_files` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_exercice` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `sha1` binary(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `exercice_tries` -- CREATE TABLE IF NOT EXISTS `exercice_tries` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_exercice` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `id_team` smallint(5) unsigned NOT NULL, `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `exercice_keys` -- CREATE TABLE IF NOT EXISTS `exercice_keys` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_exercice` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `format` enum('raw','md5','sha1','sha256','sha512') COLLATE utf8_unicode_ci NOT NULL, `value` varbinary(150) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for 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 utf8_unicode_ci NOT NULL, `level` tinyint(2) NOT NULL, `active` enum('1','0') COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`session`) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `solved` -- CREATE TABLE IF NOT EXISTS `solved` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_team` int(10) unsigned NOT NULL, `id_exercice` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `time` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE (id_team, id_exercice) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `teams` -- CREATE TABLE IF NOT EXISTS `teams` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `team_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL UNIQUE, `key_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `auth_level` tinyint(1) NOT NULL, `slogan` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `revoked` boolean 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(32) COLLATE utf8_unicode_ci NOT NULL, `lastname` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `nickname` varchar(32) COLLATE utf8_unicode_ci NOT NULL UNIQUE, `company` varchar(32) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE (firstname, lastname) ) 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, `name` varchar(32) COLLATE utf8_unicode_ci NOT NULL UNIQUE, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;