diff --git a/docs/tabledesign.html b/docs/tabledesign.html
index 679c277d..27145846 100644
--- a/docs/tabledesign.html
+++ b/docs/tabledesign.html
@@ -259,6 +259,11 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt
smallint |
number of used seats (ie. that got dealt cards) |
+
+ maxSeats |
+ smallint |
+ number of available seats |
+
comment |
text |
diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py
index 5e79fff8..b2a52c5d 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+, p48")
+ self.window.set_title("Free Poker DB - version: alpha1+, p50")
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 b5b08b58..06eb1005 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]!=48:
+ if settings[0]!=50:
print "outdated or too new database version - please recreate tables"
except:# _mysql_exceptions.ProgrammingError:
print "failed to read settings table - please recreate tables"
@@ -195,6 +195,7 @@ class fpdb_db:
handStart DATETIME,
importTime DATETIME,
seats SMALLINT,
+ maxSeats SMALLINT,
comment TEXT,
commentTs DATETIME)""")
@@ -350,7 +351,7 @@ class fpdb_db:
street4CheckCallRaiseChance INT,
street4CheckCallRaiseDone INT)""")
- self.cursor.execute("INSERT INTO Settings VALUES (48);")
+ self.cursor.execute("INSERT INTO Settings VALUES (50);")
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_save_to_db.py b/pyfpdb/fpdb_save_to_db.py
index 65a77710..d9ca0076 100644
--- a/pyfpdb/fpdb_save_to_db.py
+++ b/pyfpdb/fpdb_save_to_db.py
@@ -50,7 +50,7 @@ def ring_holdem_omaha(cursor, category, site_hand_no, gametype_id, hand_start_ti
fpdb_simple.fill_board_cards(board_values, board_suits)
- hands_id=fpdb_simple.storeHands(cursor, site_hand_no, gametype_id, hand_start_time, names, tableName)
+ hands_id=fpdb_simple.storeHands(cursor, site_hand_no, gametype_id, hand_start_time, names, tableName, maxSeats)
hands_players_ids=fpdb_simple.store_hands_players_holdem_omaha(cursor, category, hands_id, player_ids, start_cashes, positions, card_values, card_suits, winnings, rakes, seatNos)
diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py
index e7f2faec..602b1852 100644
--- a/pyfpdb/fpdb_simple.py
+++ b/pyfpdb/fpdb_simple.py
@@ -1123,9 +1123,9 @@ def store_board_cards(cursor, hands_id, board_values, board_suits):
board_values[4], board_suits[4]))
#end def store_board_cards
-def storeHands(cursor, site_hand_no, gametype_id, hand_start_time, names, tableName):
+def storeHands(cursor, site_hand_no, gametype_id, hand_start_time, names, tableName, maxSeats):
#stores into table hands
- cursor.execute ("INSERT INTO Hands (siteHandNo, gametypeId, handStart, seats, tableName, importTime) VALUES (%s, %s, %s, %s, %s, %s)", (site_hand_no, gametype_id, hand_start_time, len(names), tableName, datetime.datetime.today()))
+ cursor.execute ("INSERT INTO Hands (siteHandNo, gametypeId, handStart, seats, tableName, importTime, maxSeats) VALUES (%s, %s, %s, %s, %s, %s, %s)", (site_hand_no, gametype_id, hand_start_time, len(names), tableName, datetime.datetime.today(), maxSeats))
#todo: find a better way of doing this...
cursor.execute("SELECT id FROM Hands WHERE siteHandNo=%s AND gametypeId=%s", (site_hand_no, gametype_id))
return cursor.fetchall()[0][0]