From a51f38e6b8ab697f6d6cd9e16d46bab8fec7a471 Mon Sep 17 00:00:00 2001 From: def Date: Mon, 31 Aug 2020 23:14:58 +0200 Subject: [PATCH] Fix syntax for primary key tables --- src/engine/server/databases/connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/server/databases/connection.cpp b/src/engine/server/databases/connection.cpp index 2004e81ee..e94ec9904 100644 --- a/src/engine/server/databases/connection.cpp +++ b/src/engine/server/databases/connection.cpp @@ -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);