diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fcff99d..0d1c1565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ func(T) error ``` +- Make `PRAGMA optimize` statement optional ([#5611](https://github.com/pocketbase/pocketbase/discussions/5611)). + ## v0.23.0-rc2 diff --git a/core/collection_record_table_sync.go b/core/collection_record_table_sync.go index ef6f42df..30aa675d 100644 --- a/core/collection_record_table_sync.go +++ b/core/collection_record_table_sync.go @@ -2,6 +2,7 @@ package core import ( "fmt" + "log/slog" "strconv" "strings" @@ -145,7 +146,7 @@ func (app *BaseApp) SyncRecordTableSchema(newCollection *Collection, oldCollecti // (https://www.sqlite.org/pragma.html#pragma_optimize) _, optimizeErr := app.DB().NewQuery("PRAGMA optimize").Execute() if optimizeErr != nil { - return fmt.Errorf("failed to run optimize after the fields changes: %w", optimizeErr) + app.Logger().Warn("Failed to run PRAGMA optimize after record table sync", slog.String("error", optimizeErr.Error())) } return nil