Skip to content

Commit

Permalink
feat(database): ✨ Add index for mongodb (#991)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Aug 28, 2023
1 parent 1796986 commit dc7aaa2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 2 additions & 0 deletions github-bot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ dependencies {
implementation("io.quarkus:quarkus-micrometer-registry-prometheus")
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.24.2'
implementation("io.quarkus:quarkus-opentelemetry")
implementation("io.quarkus:quarkus-liquibase-mongodb")
implementation("io.quarkus:quarkus-mongodb-client")
implementation project(":application")
implementation project(":commons")
implementation "io.quarkiverse.loggingmanager:quarkus-logging-manager:3.0.1"
Expand Down
4 changes: 3 additions & 1 deletion github-bot/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ quarkus.mongodb.metrics.enabled=true
quarkus.http.cors.origins=*
%prod.quarkus.oidc.token-state-manager.split-tokens=true
quarkus.vertx.max-worker-execute-time=30m
%test.quarkus.scheduler.enabled=false
%test.quarkus.scheduler.enabled=false
# Liquibase MongoDB minimal config properties
quarkus.liquibase-mongodb.migrate-at-start=true
23 changes: 23 additions & 0 deletions github-bot/src/main/resources/db/changeLog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<changeSet id="1" author="martinwitt">
<ext:createIndex collectionName="BadSmell">
<ext:keys>{commitHash: 1}</ext:keys>
<ext:options>{name: "commitHash_idx"}</ext:options>
</ext:createIndex>
<ext:createIndex collectionName="BadSmell">
<ext:keys>{ruleID: 1}</ext:keys>
<ext:options>{name: "ruleID_idx"}</ext:options>
</ext:createIndex>
<ext:createIndex collectionName="BadSmell">
<ext:keys>{commitHash: 1, ruleID:1}</ext:keys>
<ext:options>{name: "commitHash_ruleID_idx"}</ext:options>
</ext:createIndex>
</changeSet>
</databaseChangeLog>

0 comments on commit dc7aaa2

Please sign in to comment.