File tree Expand file tree Collapse file tree
src/main/kotlin/com/github/quiltservertools/ledger/database Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,6 +122,11 @@ object DatabaseManager {
122122 Tables .Sources ,
123123 Tables .Worlds ,
124124 )
125+ try {
126+ exec(" CREATE INDEX IF NOT EXISTS actions_time ON actions(time)" )
127+ } catch (e: java.sql.SQLException ) {
128+ logWarn(" Could not create actions_time index (MySQL 8.0.12+ required if using MySQL): ${e.message} " )
129+ }
125130 logInfo(" Tables created" )
126131 }
127132
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ object Tables {
5555
5656 object Actions : IntIdTable(" actions" ) {
5757 val actionIdentifier = reference(" action_id" , ActionIdentifiers .id).index()
58- val timestamp = timestamp(" time" )
58+ val timestamp = timestamp(" time" ).index( " actions_time " )
5959 val x = integer(" x" )
6060 val y = integer(" y" )
6161 val z = integer(" z" )
You can’t perform that action at this time.
0 commit comments