\cheetahSchemaCreator

Class SchemaCreator Handles creating database tables for this library

Summary

Methods
Properties
Constants
__construct()
createBetsTable()
createMatchesTable()
createTeamsTable()
createGoalsTable()
createPlayersTable()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(\mysqli  $db) 

SchemaCreator constructor. Automatically creates all database tables if they do not yet exist.

Parameters

\mysqli $db

createBetsTable()

createBetsTable() 

Creates the bets table:

bets:

| id | user_id | match_id | home_score | away_score |

createMatchesTable()

createMatchesTable() 

Creates the matches table:

matches:

| id | home_id | away_id | home_score | away_score | matchday | | kickoff | finished |

createTeamsTable()

createTeamsTable() 

Creates the teams table:

teams:

| id | name | shortname | abbreviation | icon |

createGoalsTable()

createGoalsTable() 

Creates the goals table:

goals:

| id | match_id | player_id | minute | home_score | away_score | | penalty | owngoal |

createPlayersTable()

createPlayersTable() 

Creates the players table:

players:

| id | team_id | name |