From 119e1fb3f2318c7b647606cd2ff536decd11b778 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Wed, 10 Aug 2022 19:08:29 +0300 Subject: [PATCH] use fixed ids in the default profiles system collections migration --- migrations/1640988000_init.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/migrations/1640988000_init.go b/migrations/1640988000_init.go index 8ee07ad6..439c9138 100644 --- a/migrations/1640988000_init.go +++ b/migrations/1640988000_init.go @@ -96,6 +96,7 @@ func init() { UpdateRule: &profileOwnerRule, Schema: schema.NewSchema( &schema.SchemaField{ + Id: "pbfielduser", Name: models.ProfileCollectionUserFieldName, Type: schema.FieldTypeUser, Unique: true, @@ -107,11 +108,13 @@ func init() { }, }, &schema.SchemaField{ + Id: "pbfieldname", Name: "name", Type: schema.FieldTypeText, Options: &schema.TextOptions{}, }, &schema.SchemaField{ + Id: "pbfieldavatar", Name: "avatar", Type: schema.FieldTypeFile, Options: &schema.FileOptions{ @@ -128,6 +131,8 @@ func init() { }, ), } + collection.Id = "systemprofiles0" + collection.MarkAsNew() return daos.New(db).SaveCollection(collection) }, func(db dbx.Builder) error {