X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=create_database.sql;h=d7b7e2091d769e2807c9542de252e30b9ee6a040;hp=b480bf3b8b68dcec0df70fcec7a68abdec17dfc0;hb=5db5f9e9ee3544b1a2b82ad1dc4e250530dd8e64;hpb=e68d4598c0d0a5e1f138b9c891f5c1c9ae0e8541 diff --git a/create_database.sql b/create_database.sql index b480bf3..d7b7e20 100644 --- a/create_database.sql +++ b/create_database.sql @@ -74,7 +74,7 @@ CREATE TABLE `Game` ( `solo` enum('trumpless','jack','queen','trump','club','spade','heart','silent') default NULL, `sickness` int(11) default NULL, `startplayer` tinyint(4) default '1', - `playerid` int(11) default NULL, + `player` int(11) default NULL, `status` enum('pre','play','gameover') default NULL, `ruleset` int(11) default NULL, `session` int(11) default NULL, @@ -204,9 +204,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `Score`; CREATE TABLE `Score` ( `id` int(11) NOT NULL auto_increment, + `create_date` timestamp NOT NULL default '0000-00-00 00:00:00', `game_id` int(11) NOT NULL default '0', - `hand_id` int(11) NOT NULL default '0', - `score` tinyint(4) default NULL, + `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' + '60','call60','against60','made60','30','call30','against30','made30', + '0','call0','against0','made0', + 'fox','karlchen','dulle','doko','againstqueens') default NULL, UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -230,6 +236,7 @@ CREATE TABLE `Trick` ( `create_date` timestamp NOT NULL default '0000-00-00 00:00:00', `id` int(11) NOT NULL auto_increment, `game_id` int(11) NOT NULL default '0', + `winner` tinyint(4) default NULL, UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -310,10 +317,58 @@ CREATE TABLE `User_Prefs` ( -- -/*!40000 ALTER TABLE `User_Prefs` DISABLE KEYS */; -LOCK TABLES `User_Prefs` WRITE; + + +/*!40000 ALTER TABLE `Recovery` DISABLE KEYS */; +LOCK TABLES `Recovery` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `Recovery` ENABLE KEYS */; + + +DROP TABLE IF EXISTS `Recovery`; +CREATE TABLE `Recovery` ( + `id` int(11) NOT NULL auto_increment, + `user_id` int(11) NOT NULL default '0', + `password` varchar(32) default NULL, + `create_date` timestamp NOT NULL default '0000-00-00 00:00:00', + UNIQUE KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `Recovery` +-- + +/*!40000 ALTER TABLE `Recovery` DISABLE KEYS */; +LOCK TABLES `Recovery` WRITE; UNLOCK TABLES; -/*!40000 ALTER TABLE `User_Prefs` ENABLE KEYS */; +/*!40000 ALTER TABLE `Recovery` ENABLE KEYS */; + +/*!40000 ALTER TABLE `Reminder` DISABLE KEYS */; +LOCK TABLES `Reminder` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `Reminder` ENABLE KEYS */; + +DROP TABLE IF EXISTS `Reminder`; +CREATE TABLE `Reminder` ( + `id` int(11) NOT NULL auto_increment, + `user_id` int(11) NOT NULL default '0', + `game_id` int(11) NOT NULL default '0', + `create_date` timestamp NOT NULL default '0000-00-00 00:00:00', + UNIQUE KEY `id` (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `Reminder` +-- + +/*!40000 ALTER TABLE `Reminder` DISABLE KEYS */; +LOCK TABLES `Reminder` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `Reminder` ENABLE KEYS */; + + + + /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;