X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=create_database.sql;h=47d1b5593fc8621aa80aec1c51bc00f5a5b68c47;hp=e863f538bfc051d546bdcab2cac403c703e758bd;hb=d68b2fa2ea0ef193ca1d9d906a8e8071dd191e77;hpb=fc2fadb0033767d7e75ff501af60b6120f982f77 diff --git a/create_database.sql b/create_database.sql index e863f53..47d1b55 100644 --- a/create_database.sql +++ b/create_database.sql @@ -62,6 +62,30 @@ LOCK TABLES `Comment` WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE `Comment` ENABLE KEYS */; +-- +-- Table structure for table `Notes` +-- + +DROP TABLE IF EXISTS `Notes`; +CREATE TABLE `Notes` ( + `mod_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `create_date` timestamp NOT NULL default '0000-00-00 00:00:00', + `id` int(11) NOT NULL auto_increment, + `user_id` int(11) default NULL, + `game_id` int(11) default NULL, + `comment` text, + UNIQUE KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `Notes` +-- + +/*!40000 ALTER TABLE `Notes` DISABLE KEYS */; +LOCK TABLES `Notes` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `Notes` ENABLE KEYS */; + -- -- Table structure for table `Game` -- @@ -80,7 +104,8 @@ CREATE TABLE `Game` ( `ruleset` int(11) default NULL, `session` int(11) default NULL, `id` int(11) NOT NULL auto_increment, - UNIQUE KEY `id` (`id`) + UNIQUE KEY `id` (`id`), + KEY `session` (`session`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- @@ -176,6 +201,32 @@ LOCK TABLES `Hand_Card` WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE `Hand_Card` ENABLE KEYS */; +-- +-- Table structure for table `Card_Exchange` +-- + +DROP TABLE IF EXISTS `Card_Exchange`; +CREATE TABLE `Card_Exchange` ( + `id` int(11) NOT NULL auto_increment, + `orig_hand_id` int(11) NOT NULL default '0', + `new_hand_id` int(11) NOT NULL default '0', + `card_id` int(11) NOT NULL default '0', + UNIQUE KEY `id` (`id`), + KEY `orig_hand_id` (`orig_hand_id`), + KEY `new_hand_id` (`new_hand_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `Hand_Card` +-- + + +/*!40000 ALTER TABLE `Hand_Card` DISABLE KEYS */; +LOCK TABLES `Hand_Card` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `Hand_Card` ENABLE KEYS */; + + -- -- Table structure for table `Play` -- @@ -214,7 +265,7 @@ CREATE TABLE `Score` ( `party` enum('re','contra') default NULL , `winner_id` int(11) default NULL , `looser_id` int(11) default NULL , - `score` enum('120', 'call120','against120','90','call90','against90','made90' + `score` enum('120', 'call120','against120','90','call90','against90','made90', '60','call60','against60','made60','30','call30','against30','made30', '0','call0','against0','made0', 'fox','karlchen','dulle','doko','againstqueens') default NULL,