Fix syntax for primary key tables

This commit is contained in:
def 2020-08-31 23:14:58 +02:00
parent f00cab1b55
commit a51f38e6b8

View file

@ -21,7 +21,7 @@ void IDbConnection::FormatCreateRace(char *aBuf, unsigned int BufferSize)
"cp22 FLOAT DEFAULT 0, cp23 FLOAT DEFAULT 0, cp24 FLOAT DEFAULT 0, "
"cp25 FLOAT DEFAULT 0, "
"GameID VARCHAR(64), "
"DDNet7 BOOL DEFAULT FALSE"
"DDNet7 BOOL DEFAULT FALSE, "
"PRIMARY KEY (Map, Name, Time, Timestamp, Server)"
");",
GetPrefix(), BinaryCollate(), MAX_NAME_LENGTH, BinaryCollate());
@ -37,7 +37,7 @@ void IDbConnection::FormatCreateTeamrace(char *aBuf, unsigned int BufferSize, co
"Time FLOAT DEFAULT 0, "
"ID %s NOT NULL, " // VARBINARY(16) for MySQL and BLOB for SQLite
"GameID VARCHAR(64), "
"DDNet7 BOOL DEFAULT FALSE"
"DDNet7 BOOL DEFAULT FALSE, "
"PRIMARY KEY (ID, Name)"
");",
GetPrefix(), BinaryCollate(), MAX_NAME_LENGTH, BinaryCollate(), pIdType);