diff --git a/pkg/setup/collection.go b/pkg/setup/collection.go index 008fb711a4cca7ad65030c629975d95904c52387..375fedf64ee38fa4e9d195667b811c0a2f5c444e 100644 --- a/pkg/setup/collection.go +++ b/pkg/setup/collection.go @@ -16,6 +16,7 @@ var ( ErrInstallCollections = errors.New("failed to install collections") ErrUninstallCollections = errors.New("failed to uninstall collections") ErrCollectionAlreadyExists = errors.New("failed to uninstall collections") + key = "extension" ) type CollectionsOption func(c *CollectionConfig) @@ -157,7 +158,7 @@ func (s *Setup) InstallCollection(ctx context.Context, c CollectionConfig) (setS return false, err } } else { - if collection.Schema.Metadata != nil && exist.Schema.Metadata["extension"] != collection.Schema.Metadata["extension"] && !s.IsForce() { + if collection.Schema.Metadata != nil && exist.Schema.Metadata[key] != collection.Schema.Metadata[key] && !s.IsForce() { return false, ErrCollectionAlreadyExists }