removed TourneysPlayers.payinAmounts

This commit is contained in:
steffen123 2010-07-02 22:40:40 +02:00
parent 6b417ebdd4
commit d291b8621f
4 changed files with 5 additions and 14 deletions

View File

@ -403,7 +403,6 @@ tourneys_players_table = Table('TourneysPlayers', metadata,
Column('id', BigIntColumn, primary_key=True), Column('id', BigIntColumn, primary_key=True),
Column('tourneyId', Integer, ForeignKey("Tourneys.id"), nullable=False), Column('tourneyId', Integer, ForeignKey("Tourneys.id"), nullable=False),
Column('playerId', Integer, ForeignKey("Players.id"), nullable=False), Column('playerId', Integer, ForeignKey("Players.id"), nullable=False),
Column('payinAmount', Integer), # INT NOT NULL
Column('rank', Integer), # INT NOT NULL Column('rank', Integer), # INT NOT NULL
Column('winnings', Integer), # INT NOT NULL Column('winnings', Integer), # INT NOT NULL
Column('winningsCurrency', Text), # TEXT Column('winningsCurrency', Text), # TEXT

View File

@ -75,7 +75,7 @@ except ImportError:
use_numpy = False use_numpy = False
DB_VERSION = 123 DB_VERSION = 124
# Variance created as sqlite has a bunch of undefined aggregate functions. # Variance created as sqlite has a bunch of undefined aggregate functions.

View File

@ -846,7 +846,6 @@ class Sql:
id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id), id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id),
tourneyId INT UNSIGNED NOT NULL, FOREIGN KEY (tourneyId) REFERENCES Tourneys(id), tourneyId INT UNSIGNED NOT NULL, FOREIGN KEY (tourneyId) REFERENCES Tourneys(id),
playerId INT UNSIGNED NOT NULL, FOREIGN KEY (playerId) REFERENCES Players(id), playerId INT UNSIGNED NOT NULL, FOREIGN KEY (playerId) REFERENCES Players(id),
payinAmount INT NOT NULL,
rank INT NOT NULL, rank INT NOT NULL,
winnings INT NOT NULL, winnings INT NOT NULL,
winningsCurrency VARCHAR(4) NOT NULL, winningsCurrency VARCHAR(4) NOT NULL,
@ -861,7 +860,6 @@ class Sql:
id BIGSERIAL, PRIMARY KEY (id), id BIGSERIAL, PRIMARY KEY (id),
tourneyId INT, FOREIGN KEY (tourneyId) REFERENCES Tourneys(id), tourneyId INT, FOREIGN KEY (tourneyId) REFERENCES Tourneys(id),
playerId INT, FOREIGN KEY (playerId) REFERENCES Players(id), playerId INT, FOREIGN KEY (playerId) REFERENCES Players(id),
payinAmount INT,
rank INT, rank INT,
winnings INT, winnings INT,
winningsCurrency VARCHAR(4), winningsCurrency VARCHAR(4),
@ -875,7 +873,6 @@ class Sql:
id INT PRIMARY KEY, id INT PRIMARY KEY,
tourneyId INT, tourneyId INT,
playerId INT, playerId INT,
payinAmount INT,
rank INT, rank INT,
winnings INT, winnings INT,
winningsCurrency VARCHAR(4), winningsCurrency VARCHAR(4),
@ -3658,7 +3655,6 @@ class Sql:
""" """
self.query['getTourneysPlayers'] = """SELECT id, self.query['getTourneysPlayers'] = """SELECT id,
payinAmount,
rank, rank,
winnings, winnings,
winningsCurrency, winningsCurrency,
@ -3672,8 +3668,7 @@ class Sql:
""" """
self.query['updateTourneysPlayers'] = """UPDATE TourneysPlayers self.query['updateTourneysPlayers'] = """UPDATE TourneysPlayers
SET payinAmount = %s, SET rank = %s,
rank = %s,
winnings = %s, winnings = %s,
winningsCurrency = %s, winningsCurrency = %s,
rebuyCount = %s, rebuyCount = %s,
@ -3685,8 +3680,8 @@ class Sql:
""" """
self.query['insertTourneysPlayers'] = """INSERT INTO TourneysPlayers self.query['insertTourneysPlayers'] = """INSERT INTO TourneysPlayers
(tourneyId, playerId, payinAmount, rank, winnings, winningsCurrency, rebuyCount, addOnCount, koCount, comment, commentTs) (tourneyId, playerId, rank, winnings, winningsCurrency, rebuyCount, addOnCount, koCount, comment, commentTs)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
""" """
self.query['selectHandsPlayersWithWrongTTypeId'] = """SELECT id self.query['selectHandsPlayersWithWrongTTypeId'] = """SELECT id

View File

@ -89,7 +89,6 @@ class Tourney(object):
self.finishPositions = {} self.finishPositions = {}
self.winnings = {} self.winnings = {}
self.winningsCurrency = {} self.winningsCurrency = {}
self.payinAmounts = {}
self.rebuyCounts = {} self.rebuyCounts = {}
self.addOnCounts = {} self.addOnCounts = {}
self.koCounts = {} self.koCounts = {}
@ -137,7 +136,6 @@ class Tourney(object):
structs = ( ("GAMETYPE", self.gametype), structs = ( ("GAMETYPE", self.gametype),
("PLAYERS", self.players), ("PLAYERS", self.players),
("PAYIN AMOUNTS", self.payinAmounts),
("POSITIONS", self.finishPositions), ("POSITIONS", self.finishPositions),
("WINNINGS", self.winnings), ("WINNINGS", self.winnings),
("COUNT REBUYS", self.rebuyCounts), ("COUNT REBUYS", self.rebuyCounts),
@ -194,7 +192,7 @@ class Tourney(object):
""" Function to create Tourney object from database """ """ Function to create Tourney object from database """
def addPlayer(self, rank, name, winnings, winningsCurrency, payinAmount, rebuyCount, addOnCount, koCount): def addPlayer(self, rank, name, winnings, winningsCurrency, rebuyCount, addOnCount, koCount):
"""\ """\
Adds a player to the tourney, and initialises data structures indexed by player. Adds a player to the tourney, and initialises data structures indexed by player.
rank (int) indicating the finishing rank (can be -1 if unknown) rank (int) indicating the finishing rank (can be -1 if unknown)
@ -206,7 +204,6 @@ winnings (decimal) the money the player ended the tourney with (can be 0, or
self.finishPositions.update( { name : Decimal(rank) } ) self.finishPositions.update( { name : Decimal(rank) } )
self.winnings.update( { name : Decimal(winnings) } ) self.winnings.update( { name : Decimal(winnings) } )
self.winningsCurrency.update( { name : winningsCurrency } ) self.winningsCurrency.update( { name : winningsCurrency } )
self.payinAmounts.update( {name : Decimal(payinAmount) } )
self.rebuyCounts.update( {name: Decimal(rebuyCount) } ) self.rebuyCounts.update( {name: Decimal(rebuyCount) } )
self.addOnCounts.update( {name: Decimal(addOnCount) } ) self.addOnCounts.update( {name: Decimal(addOnCount) } )
self.koCounts.update( {name : Decimal(koCount) } ) self.koCounts.update( {name : Decimal(koCount) } )