make gametypes' NOT NULL consistent across backends
This commit is contained in:
parent
710fc924bf
commit
c3688f2522
|
@ -253,34 +253,34 @@ class Sql:
|
||||||
ENGINE=INNODB"""
|
ENGINE=INNODB"""
|
||||||
elif db_server == 'postgresql':
|
elif db_server == 'postgresql':
|
||||||
self.query['createGametypesTable'] = """CREATE TABLE Gametypes (
|
self.query['createGametypesTable'] = """CREATE TABLE Gametypes (
|
||||||
id SERIAL, PRIMARY KEY (id),
|
id SERIAL NOT NULL, PRIMARY KEY (id),
|
||||||
siteId INTEGER, FOREIGN KEY (siteId) REFERENCES Sites(id),
|
siteId INTEGER NOT NULL, FOREIGN KEY (siteId) REFERENCES Sites(id),
|
||||||
currency varchar(4),
|
currency varchar(4) NOT NULL,
|
||||||
type char(4),
|
type char(4) NOT NULL,
|
||||||
base char(4),
|
base char(4) NOT NULL,
|
||||||
category varchar(9),
|
category varchar(9) NOT NULL,
|
||||||
limitType char(2),
|
limitType char(2) NOT NULL,
|
||||||
hiLo char(1),
|
hiLo char(1) NOT NULL,
|
||||||
mix char(9),
|
mix char(9) NOT NULL,
|
||||||
smallBlind int,
|
smallBlind int,
|
||||||
bigBlind int,
|
bigBlind int,
|
||||||
smallBet int,
|
smallBet int NOT NULL,
|
||||||
bigBet int)"""
|
bigBet int NOT NULL)"""
|
||||||
elif db_server == 'sqlite':
|
elif db_server == 'sqlite':
|
||||||
self.query['createGametypesTable'] = """CREATE TABLE Gametypes (
|
self.query['createGametypesTable'] = """CREATE TABLE Gametypes (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY NOT NULL,
|
||||||
siteId INTEGER,
|
siteId INTEGER NOT NULL,
|
||||||
currency TEXT,
|
currency TEXT NOT NULL,
|
||||||
type TEXT,
|
type TEXT NOT NULL,
|
||||||
base TEXT,
|
base TEXT NOT NULL,
|
||||||
category TEXT,
|
category TEXT NOT NULL,
|
||||||
limitType TEXT,
|
limitType TEXT NOT NULL,
|
||||||
hiLo TEXT,
|
hiLo TEXT NOT NULL,
|
||||||
mix TEXT,
|
mix TEXT NOT NULL,
|
||||||
smallBlind INTEGER,
|
smallBlind INTEGER,
|
||||||
bigBlind INTEGER,
|
bigBlind INTEGER,
|
||||||
smallBet INTEGER,
|
smallBet INTEGER NOT NULL,
|
||||||
bigBet INTEGER,
|
bigBet INTEGER NOT NULL,
|
||||||
FOREIGN KEY(siteId) REFERENCES Sites(id) ON DELETE CASCADE)"""
|
FOREIGN KEY(siteId) REFERENCES Sites(id) ON DELETE CASCADE)"""
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user