## v0.23.0-rc15 (WIP) > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Fixed rate limiter rules matching to acount for the `Audience` field. - Minor UI fixes (fixed duplicate record control, removed duplicated id field in the record preview, hide Impersonate button for non-auth records, etc.). ## v0.23.0-rc14 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Allow changing collate, sort and partial constraints for indexes on system fields. - Added system cron to run once a day `PRAGMA wal_checkpoint(TRUNCATE)` as a fallback to assist in high traffic applications where the autocheckpoint may not be able to take its turn. _Similar to the `PRAGMA optimize`, its execution is optional and even if it is not supported by a custom driver it will result only in a WARN app log._ --- _Unless something else show up, this is expected to be the last release candidate before the final v0.23.0, planned to be released in the next 1-2 weeks. Because there were several experiments and changes in the rc versions regarding the migrations, if you had a v0.22.x app that you've migrated already to some of the other rc versions and have a full collections snapshot generated for it, note that you may have to regenerate the snapshot again (hopefully this would be the last time)._ ## v0.23.0-rc13 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Added WakaTime OAuth2 provider ([#5829](https://github.com/pocketbase/pocketbase/pull/5829); thanks @tigawanna). - Added `superuser otp EMAIL` command as fallback for generating superuser OTPs from the command line in case OTP has been enabled for the `_superusers` but the SMTP server has deliverability issues. - ⚠️ Changed `OnRecordRequestOTPRequest` hook to be triggered even if there is no record matching the email (aka. `e.Record` could be `nil`), allowing you to manually create a new user with the OTP request and assigning it to `e.Record`. - Added new `sentTo` system field to the `_otps` collection (it is managed programmatically or by superusers; it could be anything - email, phone, messanger app id, etc.). By default when the OTP is submitted via email it is automatically populated with the user email address (via the `OnMailerRecordOTPSend` hook's finalizer). This allow us on valid `auth-with-otp` request to automatically mark the user email as verified. - Added `RateLimitRule.Audience` optional field for restricting a rate limit rule for `"@guest"`-only, `"@auth"`-only, `""`-any (default). - Added default max limits for the expressions count and length of the search filter and sort params. _This is just an extra measure mostly for the case when the filter and sort parameters are resolved outside of the request context since the request size limits won't apply._ - Other minor changes (better error in case of duplicated rate limit rule, fixed typos, changed field id and name length validator to max 100, updated Go deps, etc.). ## v0.23.0-rc12 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Fixed validation error caused by the id change in v0.23.0-rc10 migration ([#5820](https://github.com/pocketbase/pocketbase/discussions/5820)). ## v0.23.0-rc11 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Fixed JSVM types errors ([#5797](https://github.com/pocketbase/pocketbase/issues/5797)). - Skip the default `loadAuthToken` middleware if `e.Auth` is already loaded ([#5800](https://github.com/pocketbase/pocketbase/discussions/5800)). - Restored the API rules for the default initial "users" collection migration to be the same as in <= v0.22.x. - ⚠️ Replaced the old Instagram provider with a new one that is compatible with the new Instagram Login APIs ([#5588](https://github.com/pocketbase/pocketbase/pull/5588); thanks @pnmcosta). _The provider key is `instagram2` to prevent conflicts with existing linked users._ - ⚠️ Changes regarding the first superuser creation based on [#5814](https://github.com/pocketbase/pocketbase/discussions/5814). - ⚠️ Removed `apis.RequireSuperuserAuthOnlyIfAny()` middleware. - ⚠️ Removed `RequestEvent.UnsafeRealIP()` to prevent misuse and confusion with `RequestEvent.RealIP()` (_the latter is considered safer because it checks the trusted proxy headers settings_). ## v0.23.0-rc10 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Restore the CRC32 checksum autogeneration for the collection/field ids in order to maintain deterministic default identifier value and minimize conflicts between custom migrations and full collections snapshots. _There is a system migration that will attempt to normalize existing system collections ids, but if you already migrated to v0.23.0-rc and have generated a full collections snapshot migration, you have to delete it and regenerate a new one._ - Change the behavior of the default generated collections snapshot migration to act as "extend" instead of "replace" to prevent accidental data deletion. _I think this would be rare but if you want the old behaviour you can edit the generated snapshot file and replace the second argument (`deleteMissing`) of `App.ImportCollection/App.ImportCollectionsByMarshaledJSON` from `false` to `true`._ - Added `app.SubscriptionsBroker().TotalClients()` helper method to return the total registered realtime clients ([#5793](https://github.com/pocketbase/pocketbase/issues/5793)). ## v0.23.0-rc9 > [!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](https://github.com/pocketbase/pocketbase/issues/5741)). - 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 with `CGO_ENABLED=1` to avoid `multiple definition ...` linker errors in case different CGO SQLite drivers or builds are used. This means that no matter of the `CGO_ENABLED` value, now out of the box PocketBase will always use only the pure Go driver ([`modernc.org/sqlite`](https://pkg.go.dev/modernc.org/sqlite)). This will be documented properly in the new website but if you want to continue using `mattn/go-sqlite3` (e.g. because of the icu or other builtin extension) you could register it as follow: ```go 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 before `new 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.). ## v0.23.0-rc8 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Lock the `_otps` and `_mfas` system collections Delete API rule for superusers only. - Reassign in the JSVM executors the global `$app` variable with the hook scoped `e.app` value to minimize the risk of a deadlock when a hook or middleware is wrapped in a transaction. - Reuse the OAuth2 created user record pointer to ensure that all its following hooks operate on the same record instance. - Added tags support for the `OnFileTokenRequest` hook. - Other minor changes (added index for the `_collections` type column, added more detailed godoc for the collection fields and `core.App` methods, fixed flaky record enrich tests, etc.). ## v0.23.0-rc7 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Register the default panic-recover middleware after the activity logger so that we can log the error. - Updated the `RequestEvent.BindBody` FormData type inferring rules to convert numeric strings into float64 only if the resulting minimal number string representation matches the initial FormData string value ([#5687](https://github.com/pocketbase/pocketbase/issues/5687)). - Fixed the JSVM types to include properly generated function declarations when the related Go functions have shortened/combined return values. - Reorganized the record table fields<->columns syncing to remove the `PRAGMA writable_schema` usage. ## v0.23.0-rc6 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Fixed realtime 403 API error on resubscribe ([#5674](https://github.com/pocketbase/pocketbase/issues/5674)). - Fixed the auto OAuth2 avatar mapped field assignment when the OAuth2 provider doesn't return an avatar URL ([#5673](https://github.com/pocketbase/pocketbase/pull/5673)). _In case the avatar retrieval fails and the mapped record field "Required" option is not set, the error is silenced and only logged with WARN level._ - Added `Router.SEARCH(path, action)` helper method for registering `SEARCH` endpoints. - Changed all builtin middlewares to return `*hook.Handler[*core.RequestEvent]` with a default middleware id for consistency and to allow removal. Or in other words, replace `.BindFunc(apis.Gzip())` with `.Bind(apis.Gzip())`. - Updated the JSVM types to reflect the recent changes. ## v0.23.0-rc5 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Added Notion OAuth2 provider ([#4999](https://github.com/pocketbase/pocketbase/pull/4999); thanks @s-li1). - Added monday.com OAuth2 provider ([#5346](https://github.com/pocketbase/pocketbase/pull/5346); thanks @Jaytpa01). - Added option to retrieve the OIDC OAuth2 user info from the `id_token` payload for the cases when the provider doesn't have a dedicated user info endpoint. - Fixed the relation record picker to sort by default by `@rowid` instead of the `created` field as the latter is optional ([#5641](https://github.com/pocketbase/pocketbase/discussions/5641)). - Fixed the UI "Set Superusers only" button click not properly resetting the input state. - Fixed the OAuth2 providers logo path shown in the "Authorized providers" UI. - Fixed the single value UI for the `select`, `file` and `relation` fields ([#5646](https://github.com/pocketbase/pocketbase/discussions/5646)) ## v0.23.0-rc4 > [!CAUTION] > **This is a prerelease intended for test and experimental purposes only!** - Fixed the UI settings update form to prevent sending empty string for the mail password or the S3 secret options on resave of the form. - ⚠️ Added an exception for the `OAuth2` field in the GO->JSVM name mapping rules: ``` // old -> new collection.oAuth2.* -> collection.oauth2.* ``` - Added more user friendly view collection truncate error message. - Added an extra suffix character to the name of autogenerated template migration file for `*test` suffixed collections to prevent acidentally resulting in `_test.go` migration files. - Added `FieldsList.AddMarshaledJSON([]byte)` helper method to load a serialized json array of objects or a single json object into an existing collection fields list. - Fixed the autogenerated Go migration template when updating a collection ([#5631](https://github.com/pocketbase/pocketbase/discussions/5631)). ⚠️ If you have already used a previous prerelease and have autogenerated Go migration files, please check the migration files named **`{timestamp}_updated_{collection}.go`** and manually change:
Old (broken) | New |
---|---|
```go // add field / update field if err := json.Unmarshal([]byte(`[{ ... }]`), &collection.Fields); err != nil { return err } ``` | ```go // add field / update field if err := collection.Fields.AddMarshaledJSON([]byte(`{ ... }`)); err != nil { return err } ``` |