Add a db type for db specific things

This commit is contained in:
eikek
2022-05-28 17:12:32 +02:00
parent 4b2752535c
commit 42435c693a
7 changed files with 64 additions and 38 deletions

View File

@ -11,6 +11,7 @@ import cats.effect.Async
import docspell.config.Implicits._
import docspell.config.{ConfigFactory, FtsType, Validation}
import docspell.scheduler.CountingScheme
import docspell.store.Db
import emil.MailAddress
import emil.javamail.syntax._
@ -59,7 +60,7 @@ object ConfigFile {
cfg.fullTextSearch.enabled &&
cfg.fullTextSearch.backend == FtsType.PostgreSQL &&
cfg.fullTextSearch.postgresql.useDefaultConnection &&
!cfg.jdbc.dbmsName.contains("postgresql"),
cfg.jdbc.dbms != Db.PostgreSQL,
s"PostgreSQL defined fulltext search backend with default-connection, which is not a PostgreSQL connection!"
)
)