CREATE TABLE IF NOT EXISTS `_ss_tournament` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`annonce` longtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `_ss_tournament_keys` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`year` year(4) NOT NULL DEFAULT '0000',
`type` int(11) NOT NULL DEFAULT '0',
`total_tour` int(11) NOT NULL DEFAULT '0',
`public` int(11) NOT NULL DEFAULT '0',
`total_team` int(11) NOT NULL DEFAULT '0',
`home` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `_ss_tournament_team` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`team_id` int(11) NOT NULL DEFAULT '0',
`tournament_id` int(11) NOT NULL DEFAULT '0',
`games` int(11) NOT NULL DEFAULT '0',
`winners` int(11) NOT NULL DEFAULT '0',
`draws` int(11) NOT NULL DEFAULT '0',
`loss` int(11) NOT NULL DEFAULT '0',
`f` int(11) NOT NULL DEFAULT '0',
`a` int(11) NOT NULL DEFAULT '0',
`points` int(11) NOT NULL DEFAULT '0',
`priority` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `_ss_tournament_tour` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tournament_id` int(11) NOT NULL DEFAULT '0',
`team_left` int(11) NOT NULL DEFAULT '0',
`team_right` int(11) NOT NULL DEFAULT '0',
`f` int(11) NOT NULL DEFAULT '0',
`a` int(11) NOT NULL DEFAULT '0',
`tour` int(11) NOT NULL DEFAULT '0',
`date` date NOT NULL DEFAULT '0000-00-00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;