diff --git a/pkg/setup/collection.go b/pkg/setup/collection.go index 14ccdb61f14e9a860aaad64a720cbf22f366080b..24a8661c57f133789b72b551dd58068dfe5eb636 100644 --- a/pkg/setup/collection.go +++ b/pkg/setup/collection.go @@ -51,7 +51,10 @@ func SkipMigration() CollectionsOption { func OverwriteCollection() CollectionsOption { return func(c *CollectionConfig) { 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 } } }