LAYOUT: improved the layout of the cards a bit
[e-DoKo.git] / create_database.sql
index 66c0cc330ee787591373066c989c7cdf655bd217..d552be58c6fe8954db7994b013148b20b6aa82a8 100644 (file)
@@ -70,10 +70,14 @@ CREATE TABLE `Game` (
   `mod_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
   `create_date` timestamp NOT NULL default '0000-00-00 00:00:00',
   `randomnumbers` varchar(136) default NULL,
   `mod_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
   `create_date` timestamp NOT NULL default '0000-00-00 00:00:00',
   `randomnumbers` varchar(136) default NULL,
-  `type` enum('solo','wedding','poverty','dpoverty') default NULL,
+  `type` enum('normal','solo','wedding','poverty','dpoverty') default NULL,
   `solo` enum('trumpless','jack','queen','trump','club','spade','heart','silent') default NULL,
   `solo` enum('trumpless','jack','queen','trump','club','spade','heart','silent') default NULL,
+  `sickness` int(11) default NULL,
+  `startplayer` tinyint(4) default '1', 
+  `player` int(11) default NULL, 
   `status` enum('pre','play','gameover') default NULL,
   `status` enum('pre','play','gameover') default NULL,
-  `followup_of` int(11) default NULL,
+  `ruleset` int(11) default NULL,
+  `session` int(11) default NULL,
   `id` int(11) NOT NULL auto_increment,
   UNIQUE KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
   `id` int(11) NOT NULL auto_increment,
   UNIQUE KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -88,6 +92,34 @@ LOCK TABLES `Game` WRITE;
 UNLOCK TABLES;
 /*!40000 ALTER TABLE `Game` ENABLE KEYS */;
 
 UNLOCK TABLES;
 /*!40000 ALTER TABLE `Game` ENABLE KEYS */;
 
+
+--
+-- Table structure for table `Ruleset`
+--
+
+DROP TABLE IF EXISTS `Rulesets`;
+CREATE TABLE `Rulesets` (
+  `mod_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `create_date` timestamp NOT NULL default '0000-00-00 00:00:00',
+  `dullen` enum('none','firstwins','secondwins') default 'secondwins',
+  `schweinchen` enum ('none','both','second','secondaftercall') default 'second',
+  `call` enum ('1st-own-card','5th-card','9-cards') default '1st-own-card',
+  `id` int(11) NOT NULL auto_increment,
+  UNIQUE KEY `id` (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+  
+--
+-- Dumping data for table `Rulesets`
+--
+
+
+/*!40000 ALTER TABLE `Rulesets` DISABLE KEYS */;
+LOCK TABLES `Rulesets` WRITE;
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `Rulesets` ENABLE KEYS */;
+
+
+
 --
 -- Table structure for table `Hand`
 --
 --
 -- Table structure for table `Hand`
 --
@@ -103,9 +135,7 @@ CREATE TABLE `Hand` (
   `party` enum('re','contra') default NULL,
   `sickness` enum('wedding','nines','poverty','solo') default NULL,
   `solo` enum('trumpless','jack','queen','trump','club','spade','heart','silent') default NULL,
   `party` enum('re','contra') default NULL,
   `sickness` enum('wedding','nines','poverty','solo') default NULL,
   `solo` enum('trumpless','jack','queen','trump','club','spade','heart','silent') default NULL,
-  `sick_call` enum('true','false') default 'false',
-  `win_call` enum('true','false') default 'false',
-  `point_call` enum('90','60','30','0') default NULL,
+  `point_call` enum('120','90','60','30','0') default NULL,
   UNIQUE KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
   UNIQUE KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
@@ -174,9 +204,13 @@ UNLOCK TABLES;
 DROP TABLE IF EXISTS `Score`;
 CREATE TABLE `Score` (
   `id` int(11) NOT NULL auto_increment,
 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',
   `game_id` int(11) NOT NULL default '0',
   `hand_id` int(11) NOT NULL default '0',
-  `score` tinyint(4) default NULL,
+  `score` enum('120', 'call120','against120','90','call90','against90',
+          '60','call60','against60','30','call30','against30',
+          '0','call0','against0',
+          'fox','karlchen','dulle','doko','againstqueens') default NULL,
   UNIQUE KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
   UNIQUE KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
@@ -200,6 +234,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',
   `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;
 
   UNIQUE KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
@@ -280,10 +315,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;
 UNLOCK TABLES;
-/*!40000 ALTER TABLE `User_Prefs` ENABLE KEYS */;
+/*!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 `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 */;
 
 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;