summaryrefslogtreecommitdiffstats
path: root/create_database.sql
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2009-03-16 22:06:21 -0700
committerArun Persaud <arun@nubati.net>2009-03-29 10:47:55 -0700
commit6206ef89ad9a9a1a541ecb67971815d11f12199b (patch)
tree86af68a4ce38a5c88d3c491a707b6df8c9ded337 /create_database.sql
parent3fd01c7b9fa78fb08ca1ad61c1de850b9a6b9870 (diff)
downloade-DoKo-6206ef89ad9a9a1a541ecb67971815d11f12199b.tar.gz
e-DoKo-6206ef89ad9a9a1a541ecb67971815d11f12199b.tar.bz2
e-DoKo-6206ef89ad9a9a1a541ecb67971815d11f12199b.zip
BUGFIX: store canceled games, don't delete them
deleting the games could result in the same people getting the same hand redealt over and over again. By just keeping track of the hands in the game table, this problem should be gone. Fixed issue #50.
Diffstat (limited to 'create_database.sql')
-rw-r--r--create_database.sql30
1 files changed, 26 insertions, 4 deletions
diff --git a/create_database.sql b/create_database.sql
index 47d1b55..319cdd3 100644
--- a/create_database.sql
+++ b/create_database.sql
@@ -12,6 +12,28 @@
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+
+--
+-- Table structure for table `Version`
+--
+
+DROP TABLE IF EXISTS `Version`;
+CREATE TABLE `Version` (
+ `version` int NOT NULL default '0'
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `Card`
+--
+
+
+/*!40000 ALTER TABLE `Card` DISABLE KEYS */;
+LOCK TABLES `Version` WRITE;
+INSERT INTO `Version` VALUES (1);
+UNLOCK TABLES;
+/*!40000 ALTER TABLE `Version` ENABLE KEYS */;
+
+
--
-- Table structure for table `Card`
--
@@ -98,9 +120,9 @@ CREATE TABLE `Game` (
`type` enum('normal','solo','wedding','poverty','dpoverty') 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,
+ `startplayer` tinyint(4) default '1',
+ `player` int(11) default NULL,
+ `status` enum('pre','play','gameover','cancel-timedout','cancel-nines','cancel-trump','cancel-noplay') default NULL,
`ruleset` int(11) default NULL,
`session` int(11) default NULL,
`id` int(11) NOT NULL auto_increment,
@@ -133,7 +155,7 @@ CREATE TABLE `Rulesets` (
`id` int(11) NOT NULL auto_increment,
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
+
--
-- Dumping data for table `Rulesets`
--