diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 177938b2..5ad52916 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -74,7 +74,7 @@ except ImportError: use_numpy = False -DB_VERSION = 135 +DB_VERSION = 136 # Variance created as sqlite has a bunch of undefined aggregate functions. diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index c1520b16..a1a6c5d8 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -85,6 +85,8 @@ class Hand(object): self.isKO = False self.isMatrix = False self.isShootout = False + self.added = None + self.addedCurrency = None self.tourneyComment = None self.seating = [] diff --git a/pyfpdb/PokerStarsSummary.py b/pyfpdb/PokerStarsSummary.py index 764e072f..477d7996 100644 --- a/pyfpdb/PokerStarsSummary.py +++ b/pyfpdb/PokerStarsSummary.py @@ -93,7 +93,6 @@ class PokerStarsSummary(TourneySummary): result=result.groupdict() self.added=100*int(Decimal(result['DOLLAR']))+int(Decimal(result['CENT'])) self.addedCurrency=result['CURRENCY'] - #print "TODO: implement added:",self.added,self.addedCurrency currentLine+=1 #print "after added/entries lines[currentLine]", lines[currentLine] diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 7e509e85..b6542bac 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -415,7 +415,9 @@ class Sql: sng BOOLEAN, satellite BOOLEAN, doubleOrNothing BOOLEAN, - guarantee INT) + guarantee INT, + added INT, + addedCurrency VARCHAR(4)) ENGINE=INNODB""" elif db_server == 'postgresql': self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( @@ -444,7 +446,9 @@ class Sql: sng BOOLEAN, satellite BOOLEAN, doubleOrNothing BOOLEAN, - guarantee INT)""" + guarantee INT, + added INT, + addedCurrency VARCHAR(4))""" elif db_server == 'sqlite': self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id INTEGER PRIMARY KEY, @@ -472,7 +476,9 @@ class Sql: sng BOOLEAN, satellite BOOLEAN, doubleOrNothing BOOLEAN, - guarantee INT)""" + guarantee INT, + added INT, + addedCurrency VARCHAR(4))""" ################################ # Create Tourneys diff --git a/pyfpdb/TourneySummary.py b/pyfpdb/TourneySummary.py index 4e02ace8..737f6aca 100644 --- a/pyfpdb/TourneySummary.py +++ b/pyfpdb/TourneySummary.py @@ -79,19 +79,21 @@ class TourneySummary(object): self.matrixIdProcessed = None self.subTourneyBuyin = None self.subTourneyFee = None - self.rebuyChips = 0 - self.addOnChips = 0 - self.rebuyCost = 0 - self.addOnCost = 0 - self.totalRebuyCount = 0 - self.totalAddOnCount = 0 - self.koBounty = 0 + self.rebuyChips = None + self.addOnChips = None + self.rebuyCost = None + self.addOnCost = None + self.totalRebuyCount = None + self.totalAddOnCount = None + self.koBounty = None self.tourneyComment = None self.players = [] self.isSng = False self.isSatellite = False self.isDoubleOrNothing = False - self.guarantee = 0 + self.guarantee = None + self.added = None + self.addedCurrency = None self.gametype = {'category':None, 'limitType':None} self.comment = None self.commentTs = None @@ -154,6 +156,8 @@ class TourneySummary(object): ("SATELLITE", self.isSatellite), ("DOUBLE OR NOTHING", self.isDoubleOrNothing), ("GUARANTEE", self.guarantee), + ("ADDED", self.added), + ("ADDED CURRENCY", self.addedCurrency), ("COMMENT", self.comment), ("COMMENT TIMESTAMP", self.commentTs) )