mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-03-18 13:47:47 +02:00
[#5611] make PRAGMA optimize optional
This commit is contained in:
parent
1e480c5380
commit
1f7aba40f0
@ -8,6 +8,8 @@
|
||||
func(T) error
|
||||
```
|
||||
|
||||
- Make `PRAGMA optimize` statement optional ([#5611](https://github.com/pocketbase/pocketbase/discussions/5611)).
|
||||
|
||||
|
||||
## v0.23.0-rc2
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user