tRemove every table from dbmodel.sql besides playerboard - hadarawgs - Hadara adaptation for boardgamearena.com
(HTM) git clone git://git.z3bra.org/hadarawgs.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 59c2df303bc9f73cabbcfc2bb407b193071c48df
(DIR) parent 5feb208e686874be079ac046a125006468b86418
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Sat, 29 Feb 2020 13:42:39 +0100
Remove every table from dbmodel.sql besides playerboard
Diffstat:
M dbmodel.sql | 71 ++++---------------------------
1 file changed, 9 insertions(+), 62 deletions(-)
---
(DIR) diff --git a/dbmodel.sql b/dbmodel.sql
t@@ -9,65 +9,12 @@
-- Note: The database schema is created from this file when the game starts. If you modify this file,
-- you have to restart a game to see your changes in database.
--- Epoch cards
-CREATE TABLE IF NOT EXISTS `card` (
- `card_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `card_player` int(10) unsigned DEFAULT 0,
- `card_epoch` int(10) unsigned NOT NULL,
- `card_color` varchar(16) NOT NULL,
- `card_cost` int(10) DEFAULT 0,
- `card_bonus_income` int(10) unsigned DEFAULT 0,
- `card_bonus_military` int(10) unsigned DEFAULT 0,
- `card_bonus_culture` int(10) unsigned DEFAULT 0,
- `card_bonus_food` int(10) unsigned DEFAULT 0,
- `card_effect` int(10) unsigned DEFAULT 0,
- `card_advanced` boolean DEFAULT false,
- PRIMARY KEY (`card_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- Setup cards
-CREATE TABLE IF NOT EXISTS `setup_card` (
- `setup_card_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `setup_card_player` int(10) unsigned NOT NULL DEFAULT 0,
- `setup_card_coin` int(10) unsigned NOT NULL DEFAULT 0,
- `setup_card_initiative` int(10) unsigned NOT NULL DEFAULT 0,
- `setup_card_base_income` int(10) DEFAULT 0,
- `setup_card_base_military` int(10) DEFAULT 0,
- `setup_card_base_culture` int(10) DEFAULT 0,
- `setup_card_base_food` int(10) DEFAULT 0,
- PRIMARY KEY (`setup_card_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- Track tokens used for statues or silver medals
-CREATE TABLE IF NOT EXISTS `tile` (
- `tile_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `tile_player` int(10) NOT NULL,
- `tile_type` int(10) NOT NULL,
- `tile_used` boolean DEFAULT false,
- `tile_points` int(10) DEFAULT 0,
- PRIMARY KEY (`tile_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
--- Statues
-CREATE TABLE IF NOT EXISTS `statue` (
- `statue_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `statue_player` int(10) NOT NULL,
- `statue_index` int(10) NOT NULL,
- `statue_points` int(10) DEFAULT 0,
- `statue_tile` int(10) DEFAULT 0,
- PRIMARY KEY (`statue_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
-ALTER TABLE `player` ADD `player_animal` VARCHAR(255) NOT NULL DEFAULT '0';
-ALTER TABLE `player` ADD `player_income` INT UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `player` ADD `player_military` INT UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `player` ADD `player_culture` INT UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `player` ADD `player_food` INT UNSIGNED NOT NULL DEFAULT '0';
-
-ALTER TABLE `player` ADD `player_statue` INT UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `player` ADD `player_colony` INT UNSIGNED NOT NULL DEFAULT '0';
-
-ALTER TABLE `player` ADD `player_medal_s1` INT UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `player` ADD `player_medal_s2` INT UNSIGNED NOT NULL DEFAULT '0';
-ALTER TABLE `player` ADD `player_medal_g1` BOOLEAN NOT NULL DEFAULT false;
-ALTER TABLE `player` ADD `player_medal_g2` BOOLEAN NOT NULL DEFAULT false;
+CREATE TABLE IF NOT EXISTS `playerboard` (
+ `id` int(10) unsigned NOT NULL,
+ `animal` varchar(255) NOT NULL,
+ `income` int(10) DEFAULT 0, `income_max` int(10) DEFAULT 0,
+ `military` int(10) DEFAULT 0, `military_max` int(10) DEFAULT 0,
+ `culture` int(10) DEFAULT 0, `culture_max` int(10) DEFAULT 0,
+ `food` int(10) DEFAULT 0, `food_max` int(10) DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;