def initializeTables(cur):
	cur.execute("DROP TABLE IF EXISTS ScoringFrequency")
	cur.execute("DROP TABLE IF EXISTS EndScore")
	cur.execute("DROP TABLE IF EXISTS Game")
	cur.execute("DROP TABLE IF EXISTS EndByEndAvgScoring")
	cur.execute("DROP TABLE IF EXISTS WBS")
	cur.execute("DROP TABLE IF EXISTS WPOT")	
	cur.execute("DROP TABLE IF EXISTS PlayerTeam")
	cur.execute("DROP TABLE IF EXISTS Player")
	cur.execute("DROP TABLE IF EXISTS Team")
	cur.execute("CREATE TABLE Team(\
				ID int NOT NULL AUTO_INCREMENT,\
				Games int,\
				Wins int,\
				Losses int,\
				WinPercentage float,\
				PFG float,\
				PAG float,\
				EventsPlayed int,\
				EventsWon int,\
				WinsWith int,\
				WinsWithout int,\
				LossesWith int,\
				LossesWithout int,\
				NetScoringWith float,\
				NetScoringWithout float,\
				PRIMARY KEY (ID)\
				)")	
	cur.execute("CREATE TABLE Player(\
				ID int NOT NULL AUTO_INCREMENT,\
				FirstName varchar(30),\
				LastName varchar(30),\
				Primary Key (ID)\
				)")
	cur.execute("CREATE TABLE PlayerTeam(\
				PlayerID int NOT NULL,\
				Position int, /* 1 = Lead, 2 = Second, 3 = Third 4 = Skip*/\
				TeamID int NOT NULL,\
				FOREIGN KEY (PlayerID) REFERENCES Player(ID),\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE EndByEndAvgScoring(\
				TeamID int NOT NULL,\
				EndNumber int,\
				Hammer boolean,\
				Average float,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE Game(\
				ID int NOT NULL AUTO_INCREMENT,\
				GameDate DATE,\
				HammerTeamID int,\
				OtherTeamID int,\
				Event varchar(60),\
				FOREIGN KEY (HammerTeamID) REFERENCES Team(ID),\
				FOREIGN KEY (OtherTeamID) REFERENCES Team(ID),\
				PRIMARY KEY (ID)\
				)")

	cur.execute("CREATE TABLE EndScore(\
				EndNumber int,\
				Game int NOT NULL,\
				HammerScore int,\
				OtherScore int,\
				FOREIGN KEY (Game) REFERENCES Game(ID)\
				)")

	cur.execute("CREATE TABLE ScoringFrequency (\
				TeamID int not NULL,\
				Hammer boolean,\
				Score int,\
				rate float,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE WPOT (\
				TeamID int not NULL,\
				WinningPercentage float,\
				MonthNumber int,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE WBS (\
				TeamID int not NULL,\
				EndNumber int,\
				ScoreDifferential int,\
				WinningPercentage float,\
				Hammer boolean,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")


d7d8d65f6888ba16875f890d6b6a15767f7b094d
<mask token>

def initializeTables(cur):
    cur.execute('DROP TABLE IF EXISTS ScoringFrequency')
    cur.execute('DROP TABLE IF EXISTS EndScore')
    cur.execute('DROP TABLE IF EXISTS Game')
    cur.execute('DROP TABLE IF EXISTS EndByEndAvgScoring')
    cur.execute('DROP TABLE IF EXISTS WBS')
    cur.execute('DROP TABLE IF EXISTS WPOT')
    cur.execute('DROP TABLE IF EXISTS PlayerTeam')
    cur.execute('DROP TABLE IF EXISTS Player')
    cur.execute('DROP TABLE IF EXISTS Team')
    cur.execute(
        'CREATE TABLE Team(\t\t\t\tID int NOT NULL AUTO_INCREMENT,\t\t\t\tGames int,\t\t\t\tWins int,\t\t\t\tLosses int,\t\t\t\tWinPercentage float,\t\t\t\tPFG float,\t\t\t\tPAG float,\t\t\t\tEventsPlayed int,\t\t\t\tEventsWon int,\t\t\t\tWinsWith int,\t\t\t\tWinsWithout int,\t\t\t\tLossesWith int,\t\t\t\tLossesWithout int,\t\t\t\tNetScoringWith float,\t\t\t\tNetScoringWithout float,\t\t\t\tPRIMARY KEY (ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE Player(\t\t\t\tID int NOT NULL AUTO_INCREMENT,\t\t\t\tFirstName varchar(30),\t\t\t\tLastName varchar(30),\t\t\t\tPrimary Key (ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE PlayerTeam(\t\t\t\tPlayerID int NOT NULL,\t\t\t\tPosition int, /* 1 = Lead, 2 = Second, 3 = Third 4 = Skip*/\t\t\t\tTeamID int NOT NULL,\t\t\t\tFOREIGN KEY (PlayerID) REFERENCES Player(ID),\t\t\t\tFOREIGN KEY (TeamID) REFERENCES Team(ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE EndByEndAvgScoring(\t\t\t\tTeamID int NOT NULL,\t\t\t\tEndNumber int,\t\t\t\tHammer boolean,\t\t\t\tAverage float,\t\t\t\tSamples int,\t\t\t\tFOREIGN KEY (TeamID) REFERENCES Team(ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE Game(\t\t\t\tID int NOT NULL AUTO_INCREMENT,\t\t\t\tGameDate DATE,\t\t\t\tHammerTeamID int,\t\t\t\tOtherTeamID int,\t\t\t\tEvent varchar(60),\t\t\t\tFOREIGN KEY (HammerTeamID) REFERENCES Team(ID),\t\t\t\tFOREIGN KEY (OtherTeamID) REFERENCES Team(ID),\t\t\t\tPRIMARY KEY (ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE EndScore(\t\t\t\tEndNumber int,\t\t\t\tGame int NOT NULL,\t\t\t\tHammerScore int,\t\t\t\tOtherScore int,\t\t\t\tFOREIGN KEY (Game) REFERENCES Game(ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE ScoringFrequency (\t\t\t\tTeamID int not NULL,\t\t\t\tHammer boolean,\t\t\t\tScore int,\t\t\t\trate float,\t\t\t\tSamples int,\t\t\t\tFOREIGN KEY (TeamID) REFERENCES Team(ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE WPOT (\t\t\t\tTeamID int not NULL,\t\t\t\tWinningPercentage float,\t\t\t\tMonthNumber int,\t\t\t\tSamples int,\t\t\t\tFOREIGN KEY (TeamID) REFERENCES Team(ID)\t\t\t\t)'
        )
    cur.execute(
        'CREATE TABLE WBS (\t\t\t\tTeamID int not NULL,\t\t\t\tEndNumber int,\t\t\t\tScoreDifferential int,\t\t\t\tWinningPercentage float,\t\t\t\tHammer boolean,\t\t\t\tSamples int,\t\t\t\tFOREIGN KEY (TeamID) REFERENCES Team(ID)\t\t\t\t)'
        )

def initializeTables(cur):
	cur.execute("DROP TABLE IF EXISTS ScoringFrequency")
	cur.execute("DROP TABLE IF EXISTS EndScore")
	cur.execute("DROP TABLE IF EXISTS Game")
	cur.execute("DROP TABLE IF EXISTS EndByEndAvgScoring")
	cur.execute("DROP TABLE IF EXISTS WBS")
	cur.execute("DROP TABLE IF EXISTS WPOT")	
	cur.execute("DROP TABLE IF EXISTS PlayerTeam")
	cur.execute("DROP TABLE IF EXISTS Player")
	cur.execute("DROP TABLE IF EXISTS Team")
	cur.execute("CREATE TABLE Team(\
				ID int NOT NULL AUTO_INCREMENT,\
				Games int,\
				Wins int,\
				Losses int,\
				WinPercentage float,\
				PFG float,\
				PAG float,\
				EventsPlayed int,\
				EventsWon int,\
				WinsWith int,\
				WinsWithout int,\
				LossesWith int,\
				LossesWithout int,\
				NetScoringWith float,\
				NetScoringWithout float,\
				PRIMARY KEY (ID)\
				)")	
	cur.execute("CREATE TABLE Player(\
				ID int NOT NULL AUTO_INCREMENT,\
				FirstName varchar(30),\
				LastName varchar(30),\
				Primary Key (ID)\
				)")
	cur.execute("CREATE TABLE PlayerTeam(\
				PlayerID int NOT NULL,\
				Position int, /* 1 = Lead, 2 = Second, 3 = Third 4 = Skip*/\
				TeamID int NOT NULL,\
				FOREIGN KEY (PlayerID) REFERENCES Player(ID),\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE EndByEndAvgScoring(\
				TeamID int NOT NULL,\
				EndNumber int,\
				Hammer boolean,\
				Average float,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE Game(\
				ID int NOT NULL AUTO_INCREMENT,\
				GameDate DATE,\
				HammerTeamID int,\
				OtherTeamID int,\
				Event varchar(60),\
				FOREIGN KEY (HammerTeamID) REFERENCES Team(ID),\
				FOREIGN KEY (OtherTeamID) REFERENCES Team(ID),\
				PRIMARY KEY (ID)\
				)")

	cur.execute("CREATE TABLE EndScore(\
				EndNumber int,\
				Game int NOT NULL,\
				HammerScore int,\
				OtherScore int,\
				FOREIGN KEY (Game) REFERENCES Game(ID)\
				)")

	cur.execute("CREATE TABLE ScoringFrequency (\
				TeamID int not NULL,\
				Hammer boolean,\
				Score int,\
				rate float,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE WPOT (\
				TeamID int not NULL,\
				WinningPercentage float,\
				MonthNumber int,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

	cur.execute("CREATE TABLE WBS (\
				TeamID int not NULL,\
				EndNumber int,\
				ScoreDifferential int,\
				WinningPercentage float,\
				Hammer boolean,\
				Samples int,\
				FOREIGN KEY (TeamID) REFERENCES Team(ID)\
				)")

