Reworked database setup and added pagination
The database tables are now automatically created The history lookup now uses a view for names (for simplicity and readability) The all history lookup now uses a view combining all punishment history for efficiency
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.alttd.altitudeweb.setup;
|
||||
|
||||
import com.alttd.altitudeweb.database.Databases;
|
||||
import com.alttd.altitudeweb.database.luckperms.TeamMemberMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class InitializeLuckPerms {
|
||||
|
||||
protected static void init() {
|
||||
log.info("Initializing LuckPerms");
|
||||
Connection.getConnection(Databases.LUCK_PERMS, (configuration) -> {
|
||||
configuration.addMapper(TeamMemberMapper.class);
|
||||
}).join();
|
||||
log.debug("Initialized LuckPerms");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user