123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- DROP TABLE IF EXISTS `games`;
- ;
- ;
- CREATE TABLE `games` (
- `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
- `player1` varchar(64) NOT NULL,
- `player2` varchar(64) NOT NULL,
- `deck` enum('faction','draft','tournament') NOT NULL DEFAULT 'faction',
- `adv_rules` set('popularity','discard') DEFAULT '',
- `status` enum('CREATED','PLAYING','FINISHED','PAUSED') NOT NULL DEFAULT 'CREATED',
- `game_data` longtext NOT NULL,
- `last_played` datetime NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COMMENT='All the online games (created, ongoing & finished)';
- ;
- LOCK TABLES `games` WRITE;
- ;
- ;
- UNLOCK TABLES;
- DROP TABLE IF EXISTS `players`;
- ;
- ;
- CREATE TABLE `players` (
- `username` varchar(30) NOT NULL,
- `last_connection` datetime NOT NULL,
- `friends` text DEFAULT NULL,
- UNIQUE KEY `username` (`username`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='table with all players with online account';
- ;
- LOCK TABLES `players` WRITE;
- ;
- INSERT INTO `players` VALUES ('user1','2020-11-22 00:00:00',NULL),('user2','2020-11-22 00:00:00',NULL),('user3','2020-11-22 00:00:00',NULL),('user4','2020-11-22 00:00:00',NULL),('user5','2020-11-22 00:00:00',NULL);
- ;
- UNLOCK TABLES;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
|