* updated 'createHandsActionsTable' and 'store_hands_actions' in the SQL dictionary
This commit is contained in:
parent
c1b2a0040c
commit
1b0db117ce
|
@ -1010,11 +1010,14 @@ class Sql:
|
||||||
handsPlayerId BIGINT UNSIGNED NOT NULL, FOREIGN KEY (handsPlayerId) REFERENCES HandsPlayers(id),
|
handsPlayerId BIGINT UNSIGNED NOT NULL, FOREIGN KEY (handsPlayerId) REFERENCES HandsPlayers(id),
|
||||||
street SMALLINT NOT NULL,
|
street SMALLINT NOT NULL,
|
||||||
actionNo SMALLINT NOT NULL,
|
actionNo SMALLINT NOT NULL,
|
||||||
action CHAR(5) NOT NULL,
|
streetActionNo SMALLINT NOT NULL,
|
||||||
allIn BOOLEAN NOT NULL,
|
actionId SMALLINT NOT NULL, FOREIGN KEY (actionId) REFERENCES Actions(id),
|
||||||
amount INT NOT NULL,
|
amount INT NOT NULL,
|
||||||
comment TEXT,
|
raiseTo INT NOT NULL,
|
||||||
commentTs DATETIME)
|
amountCalled INT NOT NULL,
|
||||||
|
numDiscarded SMALLINT NOT NULL,
|
||||||
|
cardsDiscarded varchar(14),
|
||||||
|
allIn BOOLEAN NOT NULL)
|
||||||
ENGINE=INNODB"""
|
ENGINE=INNODB"""
|
||||||
elif db_server == 'postgresql':
|
elif db_server == 'postgresql':
|
||||||
self.query['createHandsActionsTable'] = """CREATE TABLE HandsActions (
|
self.query['createHandsActionsTable'] = """CREATE TABLE HandsActions (
|
||||||
|
@ -1022,24 +1025,31 @@ class Sql:
|
||||||
handsPlayerId BIGINT, FOREIGN KEY (handsPlayerId) REFERENCES HandsPlayers(id),
|
handsPlayerId BIGINT, FOREIGN KEY (handsPlayerId) REFERENCES HandsPlayers(id),
|
||||||
street SMALLINT,
|
street SMALLINT,
|
||||||
actionNo SMALLINT,
|
actionNo SMALLINT,
|
||||||
action CHAR(5),
|
streetActionNo SMALLINT,
|
||||||
allIn BOOLEAN,
|
actionId SMALLINT, FOREIGN KEY (actionId) REFERENCES Actions(id),
|
||||||
amount INT,
|
amount INT,
|
||||||
comment TEXT,
|
raiseTo INT,
|
||||||
commentTs timestamp without time zone)"""
|
amountCalled INT,
|
||||||
|
numDiscarded SMALLINT,
|
||||||
|
cardsDiscarded varchar(14),
|
||||||
|
allIn BOOLEAN)"""
|
||||||
elif db_server == 'sqlite':
|
elif db_server == 'sqlite':
|
||||||
self.query['createHandsActionsTable'] = """CREATE TABLE HandsActions (
|
self.query['createHandsActionsTable'] = """CREATE TABLE HandsActions (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
handsPlayerId BIGINT,
|
handsPlayerId BIGINT,
|
||||||
street SMALLINT,
|
street SMALLINT,
|
||||||
actionNo SMALLINT,
|
actionNo SMALLINT,
|
||||||
action CHAR(5),
|
streetActionNo SMALLINT,
|
||||||
allIn INT,
|
actionId SMALLINT,
|
||||||
amount INT,
|
amount INT,
|
||||||
comment TEXT,
|
raiseTo INT,
|
||||||
commentTs timestamp without time zone,
|
amountCalled INT,
|
||||||
FOREIGN KEY (handsPlayerId) REFERENCES HandsPlayers(id)
|
numDiscarded SMALLINT,
|
||||||
)"""
|
cardsDiscarded TEXT,
|
||||||
|
allIn BOOLEAN,
|
||||||
|
FOREIGN KEY (handsPlayerId) REFERENCES HandsPlayers(id),
|
||||||
|
FOREIGN KEY (actionId) REFERENCES Actions(id) ON DELETE CASCADE
|
||||||
|
)"""
|
||||||
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
@ -4272,11 +4282,17 @@ class Sql:
|
||||||
handsPlayerId,
|
handsPlayerId,
|
||||||
street,
|
street,
|
||||||
actionNo,
|
actionNo,
|
||||||
action,
|
streetActionNo,
|
||||||
allIn,
|
actionId,
|
||||||
amount
|
amount,
|
||||||
|
raiseTo,
|
||||||
|
amountCalled,
|
||||||
|
numDiscarded,
|
||||||
|
cardsDiscarded,
|
||||||
|
allIn
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s
|
%s
|
||||||
)"""
|
)"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user