database changes required for the cronjob calculation of the clan fights

main
hecht 13 years ago
parent 387acca439
commit a3b157840b

@ -384,14 +384,18 @@ CHARACTER SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS `clan_challenge_clans`; DROP TABLE IF EXISTS `clan_challenge_clans`;
CREATE TABLE `clan_challenge_clans` ( CREATE TABLE `clan_challenge_clans` (
`clan_challenge_id` int(11) NOT NULL, `clan_challenge_id` int(11) NOT NULL,
`id` int(11) NOT NULL,
`clan_id` int(11) NOT NULL, `clan_id` int(11) NOT NULL,
`elo` int(11) NOT NULL, `elo` int(11) NOT NULL,
`clan_coordinator` int(11) DEFAULT NULL, `clan_coordinator` int(11) DEFAULT NULL,
PRIMARY KEY (`clan_id`,`clan_challenge_id`), `elo_change` int(11) DEFAULT NULL,
KEY `clan_ch_clans_ch_id` (`clan_challenge_id`), `exp_change` int(11) DEFAULT NULL,
`points` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_challenge_id`,`id`) USING BTREE,
UNIQUE KEY `clan_challenge_clans` (`clan_challenge_id`,`clan_id`),
KEY `fk_clan_ch_coordinator` (`clan_coordinator`),
CONSTRAINT `clan_ch_clans_ch_id` FOREIGN KEY (`clan_challenge_id`) REFERENCES `clan_challenges` (`clan_challenge_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `clan_ch_clans_ch_id` FOREIGN KEY (`clan_challenge_id`) REFERENCES `clan_challenges` (`clan_challenge_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_clan_ch_coordinator` FOREIGN KEY `fk_clan_ch_coordinator` (`clan_coordinator`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE SET NULL CONSTRAINT `fk_clan_ch_coordinator` FOREIGN KEY (`clan_coordinator`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Loading…
Cancel
Save