v0.23.0-rc9
版本发布时间: 2024-11-03 20:36:44
pocketbase/pocketbase最新发布版本:v0.23.5(2024-12-08 20:25:38)
[!CAUTION] This is a prerelease intended for test and experimental purposes only!
-
Fixed auto
www.
redirect due to missing URI schema. -
Fixed collection and field renaming when reusing an old collection/field name (#5741).
If you have existing collections snapshot migrations you may want to delete and regenerate them.Edit: Collection snapshots are actually broken when combined with manual typed collections at the moment; I'll push an update sometime next week once I figure out how to resolve the issue with the random collection and field ids. -
Update the "API preview" section to include information about the batch api.
-
Exported
core.DefaultDBConnect
function that could be used as a fallback when initializing custom SQLite drivers and builds. -
⚠️ No longer loads the
mattn/go-sqlite3
driver by default when building withCGO_ENABLED=1
to avoidmultiple definition ...
linker errors in case different CGO SQLite drivers or builds are used. This means that no matter of theCGO_ENABLED
value, now out of the box PocketBase will always use only the pure Go driver (modernc.org/sqlite
). This will be documented properly in the new website but if you want to continue usingmattn/go-sqlite3
(e.g. because of the icu or other builtin extension) you could register it as follow:package main import ( "database/sql" "log" "github.com/mattn/go-sqlite3" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase" ) func init() { // initialize default PRAGMAs for each new connection sql.Register("pb_sqlite3", &sqlite3.SQLiteDriver{ ConnectHook: func(conn *sqlite3.SQLiteConn) error { _, err := conn.Exec(` PRAGMA busy_timeout = 10000; PRAGMA journal_mode = WAL; PRAGMA journal_size_limit = 200000000; PRAGMA synchronous = NORMAL; PRAGMA foreign_keys = ON; PRAGMA temp_store = MEMORY; PRAGMA cache_size = -16000; `, nil) return err }, }, ) dbx.BuilderFuncMap["pb_sqlite3"] = dbx.BuilderFuncMap["sqlite3"] } func main() { app := pocketbase.NewWithConfig(pocketbase.Config{ DBConnect: func(dbPath string) (*dbx.DB, error) { return dbx.Open("pb_sqlite3", dbPath) }, }) // custom hooks and plugins... if err := app.Start(); err != nil { log.Fatal(err) } }
Also note that if you are not planning to use the
core.DefaultDBConnect
fallback as part of your custom driver registration you can exclude the default pure Go driver from the build with the build tag-tags no_default_driver
to reduce the binary size a little. -
⚠️ Removed JSVM
BaseCollection()
,AuthCollection()
,ViewCollection()
class aliases for simplicity and to avoid confusion with the accepted constructor arguments (you can simply use as beforenew Collection({ type: "base", ... })
; this will also initialize the default type specific options). -
Other minor improvements (added validator for duplicated index definitions, updated the impersonate popup styles, added query param support for loading a collection based on its name, etc.).
1、 checksums.txt 734B
2、 pocketbase_0.23.0-rc9_darwin_amd64.zip 14.15MB
3、 pocketbase_0.23.0-rc9_darwin_arm64.zip 13.51MB
4、 pocketbase_0.23.0-rc9_linux_amd64.zip 13.89MB
5、 pocketbase_0.23.0-rc9_linux_arm64.zip 12.94MB
6、 pocketbase_0.23.0-rc9_linux_armv7.zip 12.97MB
7、 pocketbase_0.23.0-rc9_windows_amd64.zip 14.21MB
8、 pocketbase_0.23.0-rc9_windows_arm64.zip 13.05MB