| 1 | DROP TABLE IF EXISTS wcf1_racing_settings; |
|---|
| 2 | CREATE TABLE wcf1_racing_settings ( |
|---|
| 3 | saisonID int(10) unsigned NOT NULL auto_increment COMMENT 'ID der Saison', |
|---|
| 4 | saisonName varchar(255) NOT NULL COMMENT 'Name der Saison', |
|---|
| 5 | PRIMARY KEY(`saisonID`) |
|---|
| 6 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 7 | |
|---|
| 8 | DROP TABLE IF EXISTS wcf1_racing_group; |
|---|
| 9 | CREATE TABLE wcf1_racing_group ( |
|---|
| 10 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 11 | groupID int(10) unsigned NOT NULL COMMENT 'ID der Benutzergruppe der Fahrer', |
|---|
| 12 | PRIMARY KEY(`saisonID`) |
|---|
| 13 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 14 | |
|---|
| 15 | DROP TABLE IF EXISTS wcf1_racing_races; |
|---|
| 16 | CREATE TABLE wcf1_racing_races ( |
|---|
| 17 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 18 | raceID int(10) unsigned NOT NULL auto_increment COMMENT 'ID des Rennens', |
|---|
| 19 | raceNo int(10) unsigned NOT NULL COMMENT 'Rennennummer', |
|---|
| 20 | raceName varchar(255) NOT NULL COMMENT 'Rennname/Rennort', |
|---|
| 21 | drived int(10) unsigned NULL DEFAULT '0' COMMENT 'Rennen wurde schon gefahren', |
|---|
| 22 | PRIMARY KEY(`saisonID`, `raceID`), |
|---|
| 23 | INDEX ( `raceID`) |
|---|
| 24 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 25 | |
|---|
| 26 | DROP TABLE IF EXISTS wcf1_racing_teams; |
|---|
| 27 | CREATE TABLE wcf1_racing_teams ( |
|---|
| 28 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 29 | teamID int(10) unsigned NOT NULL auto_increment COMMENT 'TeamID-Nummer', |
|---|
| 30 | teamName varchar(255) NOT NULL COMMENT 'Teamname', |
|---|
| 31 | PRIMARY KEY(`saisonID`, `teamID`), |
|---|
| 32 | INDEX ( `teamID`) |
|---|
| 33 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 34 | |
|---|
| 35 | DROP TABLE IF EXISTS wcf1_racing_user_to_team; |
|---|
| 36 | CREATE TABLE wcf1_racing_user_to_team ( |
|---|
| 37 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 38 | userToTeamID int(10) unsigned NOT NULL auto_increment COMMENT 'User zu Team ID-Nummer', |
|---|
| 39 | teamID int(10) unsigned NOT NULL COMMENT 'TeamID-Nummer', |
|---|
| 40 | userID int(10) unsigned NOT NULL COMMENT 'userID-Nummer', |
|---|
| 41 | PRIMARY KEY(`saisonID`, `usertoteamID`), |
|---|
| 42 | INDEX ( `usertoteamID`) |
|---|
| 43 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 44 | |
|---|
| 45 | DROP TABLE IF EXISTS wcf1_racing_results; |
|---|
| 46 | CREATE TABLE wcf1_racing_results ( |
|---|
| 47 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 48 | resultID int(10) unsigned NOT NULL auto_increment COMMENT 'ID des Ergebnisses', |
|---|
| 49 | raceID int(10) unsigned NOT NULL COMMENT 'ID des Rennens', |
|---|
| 50 | userID int(10) unsigned NOT NULL COMMENT 'userID des Fahrers', |
|---|
| 51 | place int(10) unsigned NOT NULL COMMENT 'erfahrener Platz des Fahrers', |
|---|
| 52 | points int(10) unsigned NOT NULL COMMENT 'Punkte für den Fahrer', |
|---|
| 53 | PRIMARY KEY(`saisonID`, `resultID`), |
|---|
| 54 | INDEX ( `resultID`) |
|---|
| 55 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 56 | |
|---|
| 57 | DROP TABLE IF EXISTS wcf1_racing_results_team; |
|---|
| 58 | CREATE TABLE wcf1_racing_results_team ( |
|---|
| 59 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 60 | resultTeamID int(10) unsigned NOT NULL auto_increment COMMENT 'ID des Team-Ergebnisses', |
|---|
| 61 | resultID int(10) unsigned NOT NULL COMMENT 'ID des Ergebnisses', |
|---|
| 62 | raceID int(10) unsigned NOT NULL COMMENT 'ID des Rennens', |
|---|
| 63 | userID int(10) unsigned NOT NULL COMMENT 'userID des Fahrers', |
|---|
| 64 | teamID int(10) unsigned NOT NULL COMMENT 'ID des Teams', |
|---|
| 65 | points int(10) unsigned NOT NULL COMMENT 'Punkte für das Team', |
|---|
| 66 | PRIMARY KEY(`saisonID`, `resultTeamID`), |
|---|
| 67 | INDEX ( `resultTeamID`) |
|---|
| 68 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 69 | |
|---|
| 70 | DROP TABLE IF EXISTS wcf1_racing_points; |
|---|
| 71 | CREATE TABLE wcf1_racing_points ( |
|---|
| 72 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 73 | pointsID int(10) unsigned NOT NULL auto_increment COMMENT 'ID der Regel', |
|---|
| 74 | place int(10) unsigned NOT NULL COMMENT 'Platzierung', |
|---|
| 75 | points int(10) unsigned NOT NULL COMMENT 'Punkte für Platz', |
|---|
| 76 | PRIMARY KEY(`saisonID`, `pointsID`), |
|---|
| 77 | INDEX ( `pointsID`) |
|---|
| 78 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|
| 79 | |
|---|
| 80 | DROP TABLE IF EXISTS wcf1_racing_punish; |
|---|
| 81 | CREATE TABLE wcf1_racing_punish ( |
|---|
| 82 | saisonID int(10) unsigned NOT NULL COMMENT 'ID der Saison', |
|---|
| 83 | punishID int(10) unsigned NOT NULL auto_increment COMMENT 'ID der Strafe', |
|---|
| 84 | raceID int(10) unsigned NOT NULL COMMENT 'ID des Rennens', |
|---|
| 85 | userID int(10) unsigned NOT NULL COMMENT 'UserID', |
|---|
| 86 | minusPoints int(10) unsigned NOT NULL COMMENT 'Punkte die abgezogen werden sollen', |
|---|
| 87 | punishReason varchar(255) NOT NULL COMMENT 'Grund für die Strafe', |
|---|
| 88 | PRIMARY KEY(`saisonID`, `punishID`), |
|---|
| 89 | INDEX ( `punishID`) |
|---|
| 90 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
|---|