diff --git a/pkg/setup/collection.go b/pkg/setup/collection.go index 8ef06942274800749bf1de0f81f28e52241670de..6d4a2333438f070e3c59aa7e602820a3814039ab 100644 --- a/pkg/setup/collection.go +++ b/pkg/setup/collection.go @@ -108,7 +108,7 @@ func DefaultUpdateCollectionStrategy() CollectionsOption { update = update && *exist.View == *collection.View } - setSchema = _alwaysSetSchema || !collection.IsView() && !reflect.DeepEqual(exist.Schema, collection.Schema) + setSchema = !collection.IsView() && (_alwaysSetSchema || !reflect.DeepEqual(exist.Schema, collection.Schema)) return collection, update, setSchema, nil } @@ -185,8 +185,7 @@ func (s *Setup) InstallCollection(ctx context.Context, c CollectionConfig) (setS } } - // todo убрать !collection.IsView() после удаления константы _alwaysSetSchema - if setSchema && !collection.IsView() { + if setSchema { err = s.content.Collections.SetSchema(ctx, collection.SpaceID, collection.EnvID, collection.ID, collection.Schema) if err != nil { return false, err