diff --git a/docs/known-bugs-and-planned-features.txt b/docs/known-bugs-and-planned-features.txt index edf1469a..df8a9fce 100644 --- a/docs/known-bugs-and-planned-features.txt +++ b/docs/known-bugs-and-planned-features.txt @@ -3,8 +3,9 @@ Everything is subject to change and especially the order will often change. Patc alpha2 (release by 17Aug) ====== -implement gametypes.base/hiLo +implement hands.tableName/importTime HandsPlayers.seatNo +change tabledesign VALIGN seperate and improve instructions for update verify link in release notes split install instructions into OS-specific and OS-independent section. expand release creator to concatenate. @@ -17,6 +18,7 @@ ebuild: symlink doesnt work, USE gtk, more automation, update install-in-gentoo. alpha3 ====== +store raw hand in db export settings[hud-defaultInterval] to conf fix up bg colours in tv fill the fold to CB/2B/3B cache fields @@ -35,8 +37,9 @@ printhand each and the 2/3 relevant printplayerflags respectively on ps-lhe-ring before beta =========== +maybe remove siteId from gametypes ?change most cache fields to bigint to allow extremely big databases in excess of 2 or 4 million hands per stake and position? -optionally make tv positional +rakeback/frequent player points gentoo ebuild: USE postgresql skins optionally combine FB/FS and CB/2B/3B diff --git a/docs/tabledesign.html b/docs/tabledesign.html index 46b905a7..cff04483 100644 --- a/docs/tabledesign.html +++ b/docs/tabledesign.html @@ -229,6 +229,11 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt

bigint


+ +

tableName

+

varchar(20)

+

The site's name for the current table

+

siteHandNo

bigint

@@ -244,6 +249,11 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt

datetime (in UTC)

start date&time of the hand

+ +

importTime

+

datetime (in UTC)

+

date&time of import of this hand

+

seats

smallint

@@ -322,8 +332,13 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt

position

char(1)

-

BB=B, SB=S, Button=0, Cutoff=1, etc.

-

This is used in holdem/omaha only.

+

BB=B, SB=S, Button=0, Cutoff=1, etc.
+ This is used in holdem/omaha only.

+ + +

seatNo

+

smallint

+

The seat in which the person was sitting - necessary for HUD

ante

@@ -333,8 +348,8 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt

cardXValue

smallint

-

2-10=2-10, J=11, Q=12, K=13, A=14 (even in razz), unknown/no card=x

-

see note above table

+

2-10=2-10, J=11, Q=12, K=13, A=14 (even in razz), unknown/no card=x
+ see note above table

cardXSuit

diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index 2bb9fa42..ec3a4405 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -370,7 +370,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt") self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("delete_event", self.delete_event) self.window.connect("destroy", self.destroy) - self.window.set_title("Free Poker DB - version: alpha1+, p42") + self.window.set_title("Free Poker DB - version: alpha1+, p43") self.window.set_border_width(1) self.window.set_size_request(1020,400) self.window.set_resizable(True) diff --git a/pyfpdb/fpdb_db.py b/pyfpdb/fpdb_db.py index 43fa2702..4be539e5 100644 --- a/pyfpdb/fpdb_db.py +++ b/pyfpdb/fpdb_db.py @@ -47,7 +47,7 @@ class fpdb_db: try: self.cursor.execute("SELECT * FROM Settings") settings=self.cursor.fetchone() - if settings[0]!=41: + if settings[0]!=43: print "outdated or too new database version - please recreate tables" except:# _mysql_exceptions.ProgrammingError: print "failed to read settings table - please recreate tables" @@ -159,8 +159,10 @@ class fpdb_db: id SMALLINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id), siteId SMALLINT UNSIGNED, FOREIGN KEY (siteId) REFERENCES Sites(id), type char(4), + base char(4), category varchar(9), limitType char(2), + hiLo char(1), smallBlind int, bigBlind int, smallBet int, @@ -184,11 +186,13 @@ class fpdb_db: self.create_table("""Hands ( id BIGINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id), - siteHandNo bigint, + tableName VARCHAR(20), + siteHandNo BIGINT, gametypeId SMALLINT UNSIGNED, FOREIGN KEY (gametypeId) REFERENCES Gametypes(id), handStart DATETIME, - seats smallint, - comment text, + importTime DATETIME, + seats SMALLINT, + comment TEXT, commentTs DATETIME)""") self.create_table("""BoardCards ( @@ -237,9 +241,10 @@ class fpdb_db: id BIGINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id), handId BIGINT UNSIGNED, FOREIGN KEY (handId) REFERENCES Hands(id), playerId INT UNSIGNED, FOREIGN KEY (playerId) REFERENCES Players(id), - startCash int, - position char(1), - ante int, + startCash INT, + position CHAR(1), + seatNo SMALLINT, + ante INT, card1Value smallint, card1Suit char(1), @@ -332,7 +337,7 @@ class fpdb_db: riverCheckCallRaiseChance INT, riverCheckCallRaiseDone INT)""") - self.cursor.execute("INSERT INTO Settings VALUES (41);") + self.cursor.execute("INSERT INTO Settings VALUES (43);") self.cursor.execute("INSERT INTO Sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');") self.cursor.execute("INSERT INTO Sites VALUES (DEFAULT, \"PokerStars\", 'USD');") self.cursor.execute("INSERT INTO TourneysGametypes (id) VALUES (DEFAULT);") diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index 329db3d2..012d2b90 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -967,22 +967,31 @@ def recogniseGametypeID(cursor, topline, site_id, category, isTourney):#todo: th try: len(result) except TypeError: - if (category=="holdem" or category=="omahahi" or category=="omahahilo"): + if category=="holdem" or category=="omahahi" or category=="omahahilo": max_seats=10 + base="hold" else: max_seats=8 + base="stud" + + if category=="holdem" or category=="omahahi" or category=="studhi": + hiLo='h' + elif category=="razz": + hiLo='l' + else: + hiLo='s' if (limit_type=="fl"): big_blind=small_bet #todo: read this small_blind=big_blind/2 #todo: read this cursor.execute("""INSERT INTO Gametypes - (siteId, type, category, limitType, smallBlind, bigBlind, smallBet, bigBet) - VALUES (%s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, category, limit_type, small_blind, big_blind, small_bet, big_bet)) + (siteId, type, base, category, limitType, hiLo, smallBlind, bigBlind, smallBet, bigBet) + VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, base, category, limit_type, hiLo, small_blind, big_blind, small_bet, big_bet)) cursor.execute ("SELECT id FROM Gametypes WHERE siteId=%s AND type=%s AND category=%s AND limitType=%s AND smallBet=%s AND bigBet=%s", (site_id, type, category, limit_type, small_bet, big_bet)) else: cursor.execute("""INSERT INTO Gametypes (siteId, type, category, limitType, smallBlind, bigBlind, smallBet, bigBet) - VALUES (%s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, category, limit_type, small_bet, big_bet, 0, 0))#remember, for these bet means blind + VALUES (%s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, base, category, limit_type, hiLo, small_bet, big_bet, 0, 0))#remember, for these bet means blind cursor.execute ("SELECT id FROM Gametypes WHERE siteId=%s AND type=%s AND category=%s AND limitType=%s AND smallBlind=%s AND bigBlind=%s", (site_id, type, category, limit_type, small_bet, big_bet)) result=cursor.fetchone()