[#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:
Gani Georgiev
2023-07-17 11:38:19 +03:00
parent b9993aaa73
commit 94a1cc07d5
38 changed files with 200 additions and 160 deletions

View 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
})
}