Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Add indexesWithBooleanCheckOnHost (#169)
Browse files Browse the repository at this point in the history
* Add indexesWithBooleanCheckOnHost

* Switched to pg-index-health v.0.11.0

* Add NotValidConstraintsCheckOnHost bean
  • Loading branch information
mfvanek authored May 3, 2024
1 parent 2fe11aa commit f4a7855
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "pg-index-health-test-starter build"

allprojects {
group = "io.github.mfvanek"
version = "0.10.4-SNAPSHOT"
version = "0.11.0-SNAPSHOT"

repositories {
mavenLocal()
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
spring-boot = "2.7.18"
pitest-junit5Plugin = "1.2.1"
pitest-core = "1.15.3"
pg-index-health = "0.10.3"
pg-index-health = "0.11.0"
commons-lang3 = "3.14.0"
detekt = "1.23.6"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
import io.github.mfvanek.pg.checks.host.ForeignKeysNotCoveredWithIndexCheckOnHost;
import io.github.mfvanek.pg.checks.host.FunctionsWithoutDescriptionCheckOnHost;
import io.github.mfvanek.pg.checks.host.IndexesWithBloatCheckOnHost;
import io.github.mfvanek.pg.checks.host.IndexesWithBooleanCheckOnHost;
import io.github.mfvanek.pg.checks.host.IndexesWithNullValuesCheckOnHost;
import io.github.mfvanek.pg.checks.host.IntersectedIndexesCheckOnHost;
import io.github.mfvanek.pg.checks.host.InvalidIndexesCheckOnHost;
import io.github.mfvanek.pg.checks.host.NotValidConstraintsCheckOnHost;
import io.github.mfvanek.pg.checks.host.TablesWithBloatCheckOnHost;
import io.github.mfvanek.pg.checks.host.TablesWithMissingIndexesCheckOnHost;
import io.github.mfvanek.pg.checks.host.TablesWithoutDescriptionCheckOnHost;
Expand Down Expand Up @@ -204,6 +206,22 @@ public FunctionsWithoutDescriptionCheckOnHost functionsWithoutDescriptionCheckOn
return new FunctionsWithoutDescriptionCheckOnHost(pgConnection);
}

@Bean
@ConditionalOnClass(IndexesWithBooleanCheckOnHost.class)
@ConditionalOnBean(PgConnection.class)
@ConditionalOnMissingBean
public IndexesWithBooleanCheckOnHost indexesWithBooleanCheckOnHost(final PgConnection pgConnection) {
return new IndexesWithBooleanCheckOnHost(pgConnection);
}

@Bean
@ConditionalOnClass(NotValidConstraintsCheckOnHost.class)
@ConditionalOnBean(PgConnection.class)
@ConditionalOnMissingBean
public NotValidConstraintsCheckOnHost notValidConstraintsCheckOnHost(final PgConnection pgConnection) {
return new NotValidConstraintsCheckOnHost(pgConnection);
}

@Bean
@ConditionalOnClass(StatisticsMaintenanceOnHost.class)
@ConditionalOnBean(PgConnection.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ abstract class AutoConfigurationTestBase {
"columnsWithJsonTypeCheckOnHost",
"columnsWithSerialTypesCheckOnHost",
"functionsWithoutDescriptionCheckOnHost",
"indexesWithBooleanCheckOnHost",
"notValidConstraintsCheckOnHost",
"statisticsMaintenanceOnHost",
"configurationMaintenanceOnHost"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
import io.github.mfvanek.pg.checks.host.ForeignKeysNotCoveredWithIndexCheckOnHost;
import io.github.mfvanek.pg.checks.host.FunctionsWithoutDescriptionCheckOnHost;
import io.github.mfvanek.pg.checks.host.IndexesWithBloatCheckOnHost;
import io.github.mfvanek.pg.checks.host.IndexesWithBooleanCheckOnHost;
import io.github.mfvanek.pg.checks.host.IndexesWithNullValuesCheckOnHost;
import io.github.mfvanek.pg.checks.host.IntersectedIndexesCheckOnHost;
import io.github.mfvanek.pg.checks.host.InvalidIndexesCheckOnHost;
import io.github.mfvanek.pg.checks.host.NotValidConstraintsCheckOnHost;
import io.github.mfvanek.pg.checks.host.TablesWithBloatCheckOnHost;
import io.github.mfvanek.pg.checks.host.TablesWithMissingIndexesCheckOnHost;
import io.github.mfvanek.pg.checks.host.TablesWithoutDescriptionCheckOnHost;
Expand Down Expand Up @@ -52,6 +54,8 @@ class DatabaseStructureHealthAutoConfigurationFilteringTest extends AutoConfigur
ColumnsWithJsonTypeCheckOnHost.class,
ColumnsWithSerialTypesCheckOnHost.class,
FunctionsWithoutDescriptionCheckOnHost.class,
IndexesWithBooleanCheckOnHost.class,
NotValidConstraintsCheckOnHost.class,
StatisticsMaintenanceOnHost.class,
ConfigurationMaintenanceOnHost.class})
void withoutClass(final Class<?> type) {
Expand Down

0 comments on commit f4a7855

Please sign in to comment.