mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-14 10:45:23 +01:00
Bugfix for SQLite and UUIDs
This commit is contained in:
parent
2c73e5d33e
commit
4276af6938
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>at.pcgamingfreaks</groupId>
|
||||
<artifactId>MinePacks</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.2.2</version>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>in-project</id>
|
||||
|
@ -113,12 +113,12 @@ private void CheckDB()
|
||||
try
|
||||
{
|
||||
Statement stmt = GetConnection().createStatement();
|
||||
stmt.execute("CREATE TABLE IF NOT EXISTS `" + Table_Players + "` (`player_id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` CHAR(16) NOT NULL UNIQUE);");
|
||||
stmt.execute("CREATE TABLE IF NOT EXISTS `" + Table_Players + "` (`player_id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` CHAR(16) NOT NULL UNIQUE)" + ((plugin.UseUUIDs) ? ", `uuid` CHAR(32) UNIQUE" : "") +";");
|
||||
if(plugin.UseUUIDs)
|
||||
{
|
||||
try
|
||||
{
|
||||
stmt.execute("ALTER TABLE `" + Table_Players + "` ADD COLUMN `uuid` CHAR(32) UNIQUE;");
|
||||
stmt.execute("ALTER TABLE `" + Table_Players + "` ADD COLUMN `uuid` CHAR(32);");
|
||||
}
|
||||
catch(SQLException e) { }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user