mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
add composite primary key for cooldowns
This commit is contained in:
parent
1c4feb5f20
commit
7f737f8576
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ public class DBConnection {
|
||||||
}
|
}
|
||||||
if (!sql.tableExists("pk_cooldowns")) {
|
if (!sql.tableExists("pk_cooldowns")) {
|
||||||
ProjectKorra.log.info("Creating pk_cooldowns table");
|
ProjectKorra.log.info("Creating pk_cooldowns table");
|
||||||
final String query = "CREATE TABLE `pk_cooldowns` (uuid VARCHAR(36) NOT NULL, cooldown_id INTEGER NOT NULL, value BIGINT);";
|
final String query = "CREATE TABLE `pk_cooldowns` (uuid VARCHAR(36) NOT NULL, cooldown_id INTEGER NOT NULL, value BIGINT, PRIMARY KEY (uuid, cooldown_id));";
|
||||||
sql.modifyQuery(query, false);
|
sql.modifyQuery(query, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -111,7 +111,7 @@ public class DBConnection {
|
||||||
}
|
}
|
||||||
if (!sql.tableExists("pk_cooldowns")) {
|
if (!sql.tableExists("pk_cooldowns")) {
|
||||||
ProjectKorra.log.info("Creating pk_cooldowns table");
|
ProjectKorra.log.info("Creating pk_cooldowns table");
|
||||||
final String query = "CREATE TABLE `pk_cooldowns` (uuid TEXT(36) NOT NULL, cooldown_id INTEGER NOT NULL, value BIGINT);";
|
final String query = "CREATE TABLE `pk_cooldowns` (uuid TEXT(36) NOT NULL, cooldown_id INTEGER NOT NULL, value BIGINT, PRIMARY KEY (uuid, cooldown_id));";
|
||||||
sql.modifyQuery(query, false);
|
sql.modifyQuery(query, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue