From 0f3d700067f3e74b19641220186bd20aeb55f430 Mon Sep 17 00:00:00 2001
From: ko_oler <kooler89@gmail.com>
Date: Fri, 21 Jul 2023 13:03:20 +0300
Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?=
 =?UTF-8?q?=D0=BE=20=D0=9F=D0=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pkg/setup/collection.go | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pkg/setup/collection.go b/pkg/setup/collection.go
index 8ef06942..6d4a2333 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
-- 
GitLab