DB: Added TT.added, addedCurrency

This commit is contained in:
steffen123 2010-07-17 02:19:12 +02:00
parent c23a1388fc
commit 90ceafda6d
5 changed files with 24 additions and 13 deletions

View File

@ -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.

View File

@ -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 = []

View File

@ -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]

View File

@ -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

View File

@ -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)
)