v0.11.0
版本发布时间: 2023-01-08 17:54:21
pocketbase/pocketbase最新发布版本:v0.22.21(2024-09-18 11:56:49)
This release comes with major API rules, filters and fields enhancements.
Make sure to have a backup of your pb_data
and to read the notes below before updating (there is small breaking change in case you are filtering multi-relation fields in your client-side code).
Changes
-
Added
+
and-
body field modifiers fornumber
,files
,select
andrelation
fields.{ // oldValue + 2 "someNumber+": 2, // oldValue + ["id1", "id2"] - ["id3"] "someRelation+": ["id1", "id2"], "someRelation-": ["id3"], // delete single file by its name (file fields supports only the "-" modifier!) "someFile-": "filename.png", }
Note1:
@request.data.someField
will contain the final resolved value.Note2: The old index (
"field.0":null
) and filename ("field.filename.png":null
) based suffixed syntax for deleting files is still supported. -
! Added support for multi-match/match-all request data and collection multi-valued fields (
select
,relation
) conditions. If you want a "at least one of" type of condition, you can prefix the operator with?
.// for each someRelA.someRelB record require the "status" field to be "active" someRelA.someRelB.status = "active" // OR for "at least one of" condition someRelA.someRelB.status ?= "active"
Note: Previously the behavior for multi-valued fields was as the "at least one of" type. The release comes with system db migration that will update your existing API rules (if needed) to preserve the compatibility. If you have multi-relation filter checks in your client-side code and want to preserve the old behavior, you'll have to prefix with
?
your operator(s). -
Added support for querying
@request.data.someRelField.*
relation fields.// example submitted data: {"someRel": "REL_RECORD_ID"} @request.data.someRel.status = "active"
-
Added
:isset
modifier for the static request data fields.// prevent changing the "role" field @request.data.role:isset = false
-
Added
:length
modifier for the arrayable request data and collection fields (select
,file
,relation
).// example submitted data: {"someSelectField": ["val1", "val2"]} @request.data.someSelectField:length = 2 // check existing record field length someSelectField:length = 2
-
Added
:each
modifier support for the multi-select
request data and collection field.// check if all selected rows has "pb_" prefix roles:each ~ 'pb_%'
-
Improved the Admin UI filters autocomplete.
-
Added
@random
sort key forRANDOM()
sorted list results. -
Added Strava OAuth2 provider (#1443; thanks @szsascha).
-
Added Gitee OAuth2 provider (#1448; thanks @yuxiang-gao).
-
Added IME status check to the textarea keydown handler (#1370; thanks @tenthree).
-
Added
filesystem.NewFileFromBytes()
helper (#1420; thanks @dschissler). -
Added support for reordering uploaded multiple files.
-
Added
webp
to the default images mime type presets list (#1469; thanks @khairulhaaziq). -
Added the OAuth2 refresh token to the auth meta response (#1487).
-
Fixed the text wrapping in the Admin UI listing searchbar (#1416).
-
Fixed number field value output in the records listing (#1447).
-
Fixed duplicated settings view pages caused by uncompleted transitions (#1498).
-
Allowed sending
Authorization
header with the/auth-with-password
record and admin login requests (#1494). -
migrate down
now reverts migrations in the applied order. -
Added additional list-bucket check in the S3 config test API.
-
Other minor improvements.
1、 checksums.txt 706B
2、 pocketbase_0.11.0_darwin_amd64.zip 14.41MB
3、 pocketbase_0.11.0_darwin_arm64.zip 14.02MB
4、 pocketbase_0.11.0_linux_amd64.zip 13.92MB
5、 pocketbase_0.11.0_linux_arm64.zip 12.97MB
6、 pocketbase_0.11.0_linux_armv7.zip 13.34MB
7、 pocketbase_0.11.0_windows_amd64.zip 14.06MB
8、 pocketbase_0.11.0_windows_arm64.zip 13.09MB