mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 03:30:10 +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")) {
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
|
@ -111,7 +111,7 @@ public class DBConnection {
|
|||
}
|
||||
if (!sql.tableExists("pk_cooldowns")) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue