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 use_numpy = False
DB_VERSION = 135 DB_VERSION = 136
# Variance created as sqlite has a bunch of undefined aggregate functions. # Variance created as sqlite has a bunch of undefined aggregate functions.

View File

@ -85,6 +85,8 @@ class Hand(object):
self.isKO = False self.isKO = False
self.isMatrix = False self.isMatrix = False
self.isShootout = False self.isShootout = False
self.added = None
self.addedCurrency = None
self.tourneyComment = None self.tourneyComment = None
self.seating = [] self.seating = []

View File

@ -93,7 +93,6 @@ class PokerStarsSummary(TourneySummary):
result=result.groupdict() result=result.groupdict()
self.added=100*int(Decimal(result['DOLLAR']))+int(Decimal(result['CENT'])) self.added=100*int(Decimal(result['DOLLAR']))+int(Decimal(result['CENT']))
self.addedCurrency=result['CURRENCY'] self.addedCurrency=result['CURRENCY']
#print "TODO: implement added:",self.added,self.addedCurrency
currentLine+=1 currentLine+=1
#print "after added/entries lines[currentLine]", lines[currentLine] #print "after added/entries lines[currentLine]", lines[currentLine]

View File

@ -415,7 +415,9 @@ class Sql:
sng BOOLEAN, sng BOOLEAN,
satellite BOOLEAN, satellite BOOLEAN,
doubleOrNothing BOOLEAN, doubleOrNothing BOOLEAN,
guarantee INT) guarantee INT,
added INT,
addedCurrency VARCHAR(4))
ENGINE=INNODB""" ENGINE=INNODB"""
elif db_server == 'postgresql': elif db_server == 'postgresql':
self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes (
@ -444,7 +446,9 @@ class Sql:
sng BOOLEAN, sng BOOLEAN,
satellite BOOLEAN, satellite BOOLEAN,
doubleOrNothing BOOLEAN, doubleOrNothing BOOLEAN,
guarantee INT)""" guarantee INT,
added INT,
addedCurrency VARCHAR(4))"""
elif db_server == 'sqlite': elif db_server == 'sqlite':
self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes (
id INTEGER PRIMARY KEY, id INTEGER PRIMARY KEY,
@ -472,7 +476,9 @@ class Sql:
sng BOOLEAN, sng BOOLEAN,
satellite BOOLEAN, satellite BOOLEAN,
doubleOrNothing BOOLEAN, doubleOrNothing BOOLEAN,
guarantee INT)""" guarantee INT,
added INT,
addedCurrency VARCHAR(4))"""
################################ ################################
# Create Tourneys # Create Tourneys

View File

@ -79,19 +79,21 @@ class TourneySummary(object):
self.matrixIdProcessed = None self.matrixIdProcessed = None
self.subTourneyBuyin = None self.subTourneyBuyin = None
self.subTourneyFee = None self.subTourneyFee = None
self.rebuyChips = 0 self.rebuyChips = None
self.addOnChips = 0 self.addOnChips = None
self.rebuyCost = 0 self.rebuyCost = None
self.addOnCost = 0 self.addOnCost = None
self.totalRebuyCount = 0 self.totalRebuyCount = None
self.totalAddOnCount = 0 self.totalAddOnCount = None
self.koBounty = 0 self.koBounty = None
self.tourneyComment = None self.tourneyComment = None
self.players = [] self.players = []
self.isSng = False self.isSng = False
self.isSatellite = False self.isSatellite = False
self.isDoubleOrNothing = False self.isDoubleOrNothing = False
self.guarantee = 0 self.guarantee = None
self.added = None
self.addedCurrency = None
self.gametype = {'category':None, 'limitType':None} self.gametype = {'category':None, 'limitType':None}
self.comment = None self.comment = None
self.commentTs = None self.commentTs = None
@ -154,6 +156,8 @@ class TourneySummary(object):
("SATELLITE", self.isSatellite), ("SATELLITE", self.isSatellite),
("DOUBLE OR NOTHING", self.isDoubleOrNothing), ("DOUBLE OR NOTHING", self.isDoubleOrNothing),
("GUARANTEE", self.guarantee), ("GUARANTEE", self.guarantee),
("ADDED", self.added),
("ADDED CURRENCY", self.addedCurrency),
("COMMENT", self.comment), ("COMMENT", self.comment),
("COMMENT TIMESTAMP", self.commentTs) ("COMMENT TIMESTAMP", self.commentTs)
) )