[#2930] added extra normalizations to ensure that newly created multiple fields has the correct zero-default for already inserted records
This commit is contained in:
15
migrations/1689579878_renormalize_single_multiple_values.go
Normal file
15
migrations/1689579878_renormalize_single_multiple_values.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"github.com/pocketbase/dbx"
|
||||
)
|
||||
|
||||
// Renormalizes old single and multiple values of MultiValuer fields (file, select, relation)
|
||||
// (see https://github.com/pocketbase/pocketbase/issues/2930).
|
||||
func init() {
|
||||
AppMigrations.Register(func(db dbx.Builder) error {
|
||||
return normalizeMultivaluerFields(db)
|
||||
}, func(db dbx.Builder) error {
|
||||
return nil
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user