From 2d66b8dca31ff8894ae2e0497c912ea843a0e9f9 Mon Sep 17 00:00:00 2001 From: Frank Jogeleit Date: Sun, 22 Sep 2024 10:42:39 +0200 Subject: [PATCH] update schema check for SQLite DB Signed-off-by: Frank Jogeleit --- pkg/database/bun.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/database/bun.go b/pkg/database/bun.go index 6e1fa7fa..0bc03dc5 100644 --- a/pkg/database/bun.go +++ b/pkg/database/bun.go @@ -1089,6 +1089,10 @@ func (s *Store) fetchResults(ctx context.Context, id string) ([]v1alpha2.PolicyR } func (s *Store) RequireSchemaUpgrade(ctx context.Context) bool { + if s.IsSQLite() { + return true + } + config := Config{} err := s.db.NewSelect().Model(&config).Where("id = ?", 1).Scan(ctx)