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

Commit

Permalink
Add b-tree indexes on array columns check (#171)
Browse files Browse the repository at this point in the history
* Add b-tree indexes on array columns check

* fix: missing bean annotation

---------

Co-authored-by: Ivan Vakhrushev <[email protected]>
  • Loading branch information
mfaulther and mfvanek authored May 4, 2024
1 parent b4d639a commit 38f76ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

package io.github.mfvanek.pg.spring;

import io.github.mfvanek.pg.checks.host.BtreeIndexesOnArrayColumnsCheckOnHost;
import io.github.mfvanek.pg.checks.host.ColumnsWithJsonTypeCheckOnHost;
import io.github.mfvanek.pg.checks.host.ColumnsWithSerialTypesCheckOnHost;
import io.github.mfvanek.pg.checks.host.ColumnsWithoutDescriptionCheckOnHost;
Expand Down Expand Up @@ -222,6 +223,14 @@ public NotValidConstraintsCheckOnHost notValidConstraintsCheckOnHost(final PgCon
return new NotValidConstraintsCheckOnHost(pgConnection);
}

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

@Bean
@ConditionalOnClass(StatisticsMaintenanceOnHost.class)
@ConditionalOnBean(PgConnection.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ abstract class AutoConfigurationTestBase {
"functionsWithoutDescriptionCheckOnHost",
"indexesWithBooleanCheckOnHost",
"notValidConstraintsCheckOnHost",
"btreeIndexesOnArrayColumnsCheckOnHost",
"statisticsMaintenanceOnHost",
"configurationMaintenanceOnHost"
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

package io.github.mfvanek.pg.spring;

import io.github.mfvanek.pg.checks.host.BtreeIndexesOnArrayColumnsCheckOnHost;
import io.github.mfvanek.pg.checks.host.ColumnsWithJsonTypeCheckOnHost;
import io.github.mfvanek.pg.checks.host.ColumnsWithSerialTypesCheckOnHost;
import io.github.mfvanek.pg.checks.host.ColumnsWithoutDescriptionCheckOnHost;
Expand Down Expand Up @@ -56,6 +57,7 @@ class DatabaseStructureHealthAutoConfigurationFilteringTest extends AutoConfigur
FunctionsWithoutDescriptionCheckOnHost.class,
IndexesWithBooleanCheckOnHost.class,
NotValidConstraintsCheckOnHost.class,
BtreeIndexesOnArrayColumnsCheckOnHost.class,
StatisticsMaintenanceOnHost.class,
ConfigurationMaintenanceOnHost.class})
void withoutClass(final Class<?> type) {
Expand Down

0 comments on commit 38f76ba

Please sign in to comment.