Skip to content

Commit ae348b4

Browse files
authored
Add indexes (#7)
* Add indexes * Spotbugs
1 parent e071ac9 commit ae348b4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/main/java/io/jenkins/plugins/junit/storage/database/DatabaseSchemaLoader.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
import java.sql.SQLException;
66
import javax.sql.DataSource;
77
import org.flywaydb.core.Flyway;
8+
import org.kohsuke.accmod.Restricted;
9+
import org.kohsuke.accmod.restrictions.NoExternalUse;
810

911
import static hudson.init.InitMilestone.SYSTEM_CONFIG_ADAPTED;
1012

13+
@Restricted(NoExternalUse.class)
1114
public class DatabaseSchemaLoader {
1215

13-
public static boolean MIGRATED;
16+
static boolean MIGRATED;
1417

1518
@Initializer(after = SYSTEM_CONFIG_ADAPTED)
1619
public static void migrateSchema() throws SQLException {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CREATE INDEX job_index ON caseresults(job);
2+
CREATE INDEX job_and_build_index ON caseresults(job, build);
3+
4+
-- possibly worth adding indexes on the package and on the suite but let's see how this goes
5+
-- any feedback or index contribution welcome
6+
-- and we can remove them if they aren't useful

0 commit comments

Comments
 (0)