Skip to content
Snippets Groups Projects
Commit b4f6aae0 authored by ko_oler's avatar ko_oler
Browse files

Merge branch 'master' into feature/PRXS-1604-BigIntInNumberField

parents 58a182ee 4d9f1028
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,10 @@ func NewCollectionConfig(collection *collections.Collection, opt ...CollectionsO ...@@ -45,7 +45,10 @@ func NewCollectionConfig(collection *collections.Collection, opt ...CollectionsO
func OverwriteCollection() CollectionsOption { func OverwriteCollection() CollectionsOption {
return func(c *CollectionConfig) { return func(c *CollectionConfig) {
c.UpdateFn = func(s *Setup, old, new *collections.Collection) (*collections.Collection, bool, bool, error) { c.UpdateFn = func(s *Setup, old, new *collections.Collection) (*collections.Collection, bool, bool, error) {
return new, true, true, nil update := new.Name != old.Name || new.IsSingle() != old.IsSingle() || new.IsSystem() != old.IsSystem() ||
new.IsNoData() != old.IsNoData() || new.Hidden != old.Hidden || new.IsView() != old.IsView() || !data.ElementsMatch(old.Tags, new.Tags)
return new, update, !reflect.DeepEqual(old.Schema, new.Schema), nil
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment