mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Clarify the file names of H2 and SQLite databases
This commit is contained in:
parent
bdff84885a
commit
1e134df27d
@ -124,9 +124,9 @@ public class StorageFactory {
|
|||||||
case MYSQL:
|
case MYSQL:
|
||||||
return new SQLBacking(plugin, new MySQLProvider(plugin.getConfiguration().get(ConfigKeys.DATABASE_VALUES)), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
return new SQLBacking(plugin, new MySQLProvider(plugin.getConfiguration().get(ConfigKeys.DATABASE_VALUES)), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
||||||
case SQLITE:
|
case SQLITE:
|
||||||
return new SQLBacking(plugin, new SQLiteProvider(new File(plugin.getDataDirectory(), "luckperms.sqlite")), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
return new SQLBacking(plugin, new SQLiteProvider(new File(plugin.getDataDirectory(), "luckperms-sqlite.db")), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
||||||
case H2:
|
case H2:
|
||||||
return new SQLBacking(plugin, new H2Provider(new File(plugin.getDataDirectory(), "luckperms.db")), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
return new SQLBacking(plugin, new H2Provider(new File(plugin.getDataDirectory(), "luckperms-h2")), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
||||||
case POSTGRESQL:
|
case POSTGRESQL:
|
||||||
return new SQLBacking(plugin, new PostgreSQLProvider(plugin.getConfiguration().get(ConfigKeys.DATABASE_VALUES)), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
return new SQLBacking(plugin, new PostgreSQLProvider(plugin.getConfiguration().get(ConfigKeys.DATABASE_VALUES)), plugin.getConfiguration().get(ConfigKeys.SQL_TABLE_PREFIX));
|
||||||
case MONGODB:
|
case MONGODB:
|
||||||
|
@ -27,6 +27,12 @@ import java.io.File;
|
|||||||
public class H2Provider extends FlatfileProvider {
|
public class H2Provider extends FlatfileProvider {
|
||||||
public H2Provider(File file) {
|
public H2Provider(File file) {
|
||||||
super("H2", file);
|
super("H2", file);
|
||||||
|
|
||||||
|
// backwards compat
|
||||||
|
File data = new File(file.getParent(), "luckperms.db.mv.db");
|
||||||
|
if (data.exists()) {
|
||||||
|
data.renameTo(new File(file.getParent(), "luckperms-h2.mv.db"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -27,6 +27,12 @@ import java.io.File;
|
|||||||
public class SQLiteProvider extends FlatfileProvider {
|
public class SQLiteProvider extends FlatfileProvider {
|
||||||
public SQLiteProvider(File file) {
|
public SQLiteProvider(File file) {
|
||||||
super("SQLite", file);
|
super("SQLite", file);
|
||||||
|
|
||||||
|
// backwards compat
|
||||||
|
File data = new File(file.getParent(), "luckperms.sqlite");
|
||||||
|
if (data.exists()) {
|
||||||
|
data.renameTo(new File(file.getParent(), "luckperms-sqlite.db"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user