mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-01-03 18:47:43 +01:00
No longer create the cooldowns table if cooldown syncing is disabled
This commit is contained in:
parent
64badad148
commit
c730c18b05
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>at.pcgamingfreaks</groupId>
|
||||
<artifactId>Minepacks</artifactId>
|
||||
<version>2.0.4</version>
|
||||
<version>2.0.5</version>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:GeorgH93/Minepacks.git</connection>
|
||||
|
@ -63,9 +63,12 @@ protected void checkDB()
|
||||
"{FieldBPLastUpdate} TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY ({FieldBPOwner}),\nCONSTRAINT fk_{TableBackpacks}_{TablePlayers}_{FieldBPOwner} FOREIGN KEY ({FieldBPOwner}) " +
|
||||
"REFERENCES {TablePlayers} ({FieldPlayerID}) ON DELETE CASCADE ON UPDATE CASCADE\n);"));
|
||||
DBTools.updateDB(connection, replacePlaceholders("CREATE TABLE IF NOT EXISTS {TableCooldowns} (\n{FieldCDPlayer} INT UNSIGNED,\n{FieldCDTime} LONG NOT NULL,\nPRIMARY KEY ({FieldCDPlayer}),\n" +
|
||||
"CONSTRAINT fk_{TableCooldowns}_{TablePlayers}_{FieldCDPlayer} FOREIGN KEY ({FieldCDPlayer}) " +
|
||||
"REFERENCES {TablePlayers} ({FieldPlayerID}) ON DELETE CASCADE ON UPDATE CASCADE\n);"));
|
||||
if(syncCooldown)
|
||||
{
|
||||
DBTools.updateDB(connection, replacePlaceholders("CREATE TABLE IF NOT EXISTS {TableCooldowns} (\n{FieldCDPlayer} INT UNSIGNED NOT NULL,\n{FieldCDTime} LONG NOT NULL,\nPRIMARY KEY ({FieldCDPlayer}),\n" +
|
||||
"CONSTRAINT fk_{TableCooldowns}_{TablePlayers}_{FieldCDPlayer} FOREIGN KEY ({FieldCDPlayer}) " +
|
||||
"REFERENCES {TablePlayers} ({FieldPlayerID}) ON DELETE CASCADE ON UPDATE CASCADE\n);"));
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user