From 43edb615b08778870b4656d352443a15f1855632 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 30 Sep 2010 17:19:35 +0800 Subject: [PATCH] SQL: Fix MySQL/Postgres Actions and HandsActions --- pyfpdb/SQL.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 25dd36e5..7d2931a7 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -162,13 +162,13 @@ class Sql: self.query['createActionsTable'] = """CREATE TABLE Actions ( id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id), name varchar(32) NOT NULL, - code char(2) NOT NULL) + code char(4) NOT NULL) ENGINE=INNODB""" elif db_server == 'postgresql': self.query['createActionsTable'] = """CREATE TABLE Actions ( id SERIAL, PRIMARY KEY (id), name varchar(32), - code char(2))""" + code char(4))""" elif db_server == 'sqlite': self.query['createActionsTable'] = """CREATE TABLE Actions ( id INTEGER PRIMARY KEY, @@ -1011,7 +1011,7 @@ class Sql: street SMALLINT NOT NULL, actionNo SMALLINT NOT NULL, streetActionNo SMALLINT NOT NULL, - actionId SMALLINT NOT NULL, FOREIGN KEY (actionId) REFERENCES Actions(id), + actionId SMALLINT UNSIGNED NOT NULL, FOREIGN KEY (actionId) REFERENCES Actions(id), amount INT NOT NULL, raiseTo INT NOT NULL, amountCalled INT NOT NULL,