Increase actions actor_name column length (#525)

This commit is contained in:
Luck
2017-10-30 20:03:03 +00:00
Unverified
parent 230d9725e8
commit 0e581cbcf3
9 changed files with 15 additions and 8 deletions
@@ -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");