From 7f25cf6da89ebe3f007b8a132574673dda303c1c Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 23 Jul 2010 04:00:25 +0200 Subject: [PATCH] DB: allow NULL for TT.currency/buyin/fee for when this info is not available --- pyfpdb/Database.py | 2 +- pyfpdb/SQL.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index c0115bd9..028097dd 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -74,7 +74,7 @@ except ImportError: use_numpy = False -DB_VERSION = 137 +DB_VERSION = 138 # Variance created as sqlite has a bunch of undefined aggregate functions. diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 041ae981..4a0bde21 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -392,9 +392,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id SMALLINT UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY (id), siteId SMALLINT UNSIGNED NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), - currency varchar(4) NOT NULL, - buyIn INT NOT NULL, - fee INT NOT NULL, + currency varchar(4), + buyIn INT, + fee INT, category varchar(9) NOT NULL, limitType char(2) NOT NULL, buyInChips INT, @@ -423,9 +423,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id SERIAL, PRIMARY KEY (id), siteId INT NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id), - currency varchar(4) NOT NULL, - buyin INT NOT NULL, - fee INT NOT NULL, + currency varchar(4), + buyin INT, + fee INT, category varchar(9), limitType char(2), buyInChips INT, @@ -453,9 +453,9 @@ class Sql: self.query['createTourneyTypesTable'] = """CREATE TABLE TourneyTypes ( id INTEGER PRIMARY KEY, siteId INT NOT NULL, - currency VARCHAR(4) NOT NULL, - buyin INT NOT NULL, - fee INT NOT NULL, + currency VARCHAR(4), + buyin INT, + fee INT, category TEXT, limitType TEXT, buyInChips INT,