mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-16 02:58:14 +02:00
[#1956] normalized _requests.method to UPPERCASE
This commit is contained in:
1 parent
41f01bab0d
commit
07727dbde6
3 files changed
+24
-1
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package logs
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
)
|
||||
|
||||
// This migrations converts all logs "method" valus to all UPPERCASE (eg. "get" => "GET").
|
||||
func init() {
|
||||
LogsMigrations.Register(func(db dbx.Builder) error {
|
||||
_, err := db.NewQuery("UPDATE {{_requests}} SET method=UPPER(method)").Execute()
|
||||
|
||||
return err
|
||||
}, func(db dbx.Builder) error {
|
||||
_, err := db.NewQuery("UPDATE {{_requests}} SET method=LOWER(method)").Execute()
|
||||
|
||||
return err
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user