mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-29 19:51:40 +01:00
Increase actions actor_name column length (#525)
This commit is contained in:
parent
230d9725e8
commit
0e581cbcf3
@ -195,6 +195,13 @@ public class SqlDao extends AbstractDao {
|
||||
}
|
||||
}
|
||||
|
||||
// migrations
|
||||
try (Connection connection = provider.getConnection()) {
|
||||
try (Statement s = connection.createStatement()) {
|
||||
s.execute(prefix.apply("ALTER TABLE {prefix}actions MODIFY COLUMN actor_name VARCHAR(36)"));
|
||||
}
|
||||
}
|
||||
|
||||
setAcceptingLogins(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -35,7 +35,7 @@ import java.text.DecimalFormat;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
abstract class FlatfileConnectionFactory extends AbstractConnectionFactory {
|
||||
protected static final DecimalFormat DF = new DecimalFormat("#.00");
|
||||
protected static final DecimalFormat DF = new DecimalFormat("#.##");
|
||||
|
||||
protected final File file;
|
||||
private final ReentrantLock lock = new ReentrantLock();
|
||||
|
@ -46,7 +46,7 @@ public class H2ConnectionFactory extends FlatfileConnectionFactory {
|
||||
|
||||
File databaseFile = new File(super.file.getParent(), "luckperms-h2.mv.db");
|
||||
if (databaseFile.exists()) {
|
||||
double size = databaseFile.length() / 1048576;
|
||||
double size = databaseFile.length() / 1048576D;
|
||||
ret.put("File Size", DF.format(size) + "MB");
|
||||
} else {
|
||||
ret.put("File Size", "0MB");
|
||||
|
@ -46,7 +46,7 @@ public class SQLiteConnectionFactory extends FlatfileConnectionFactory {
|
||||
|
||||
File databaseFile = new File(super.file.getParent(), "luckperms-sqlite.db");
|
||||
if (databaseFile.exists()) {
|
||||
double size = databaseFile.length() / 1048576;
|
||||
double size = databaseFile.length() / 1048576D;
|
||||
ret.put("File Size", DF.format(size) + "MB");
|
||||
} else {
|
||||
ret.put("File Size", "0MB");
|
||||
|
@ -45,7 +45,7 @@ CREATE TABLE `{prefix}actions` (
|
||||
`id` INT AUTO_INCREMENT NOT NULL,
|
||||
`time` BIGINT NOT NULL,
|
||||
`actor_uuid` VARCHAR(36) NOT NULL,
|
||||
`actor_name` VARCHAR(16) NOT NULL,
|
||||
`actor_name` VARCHAR(36) NOT NULL,
|
||||
`type` CHAR(1) NOT NULL,
|
||||
`acted_uuid` VARCHAR(36) NOT NULL,
|
||||
`acted_name` VARCHAR(36) NOT NULL,
|
||||
|
@ -45,7 +45,7 @@ CREATE TABLE `{prefix}actions` (
|
||||
`id` INT AUTO_INCREMENT NOT NULL,
|
||||
`time` BIGINT NOT NULL,
|
||||
`actor_uuid` VARCHAR(36) NOT NULL,
|
||||
`actor_name` VARCHAR(16) NOT NULL,
|
||||
`actor_name` VARCHAR(36) NOT NULL,
|
||||
`type` CHAR(1) NOT NULL,
|
||||
`acted_uuid` VARCHAR(36) NOT NULL,
|
||||
`acted_name` VARCHAR(36) NOT NULL,
|
||||
|
@ -45,7 +45,7 @@ CREATE TABLE `{prefix}actions` (
|
||||
`id` INT AUTO_INCREMENT NOT NULL,
|
||||
`time` BIGINT NOT NULL,
|
||||
`actor_uuid` VARCHAR(36) NOT NULL,
|
||||
`actor_name` VARCHAR(16) NOT NULL,
|
||||
`actor_name` VARCHAR(36) NOT NULL,
|
||||
`type` CHAR(1) NOT NULL,
|
||||
`acted_uuid` VARCHAR(36) NOT NULL,
|
||||
`acted_name` VARCHAR(36) NOT NULL,
|
||||
|
@ -41,7 +41,7 @@ CREATE TABLE "{prefix}actions" (
|
||||
"id" SERIAL PRIMARY KEY NOT NULL,
|
||||
"time" BIGINT NOT NULL,
|
||||
"actor_uuid" VARCHAR(36) NOT NULL,
|
||||
"actor_name" VARCHAR(16) NOT NULL,
|
||||
"actor_name" VARCHAR(36) NOT NULL,
|
||||
"type" CHAR(1) NOT NULL,
|
||||
"acted_uuid" VARCHAR(36) NOT NULL,
|
||||
"acted_name" VARCHAR(36) NOT NULL,
|
||||
|
@ -43,7 +43,7 @@ CREATE TABLE `{prefix}actions` (
|
||||
`id` INTEGER PRIMARY KEY NOT NULL,
|
||||
`time` BIGINT NOT NULL,
|
||||
`actor_uuid` VARCHAR(36) NOT NULL,
|
||||
`actor_name` VARCHAR(16) NOT NULL,
|
||||
`actor_name` VARCHAR(36) NOT NULL,
|
||||
`type` CHAR(1) NOT NULL,
|
||||
`acted_uuid` VARCHAR(36) NOT NULL,
|
||||
`acted_name` VARCHAR(36) NOT NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user