From 4afcf6b19eaa13e20fc77c7aed7a379d3d4c9f9a Mon Sep 17 00:00:00 2001 From: Priyanshi Shikha <87810102+priyanshishikha@users.noreply.github.com> Date: Wed, 16 Oct 2024 22:16:10 +0530 Subject: [PATCH] update policies only (#13) --- common/conf.go | 1 + common/upgradeSteps.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/common/conf.go b/common/conf.go index 5448417..e880371 100644 --- a/common/conf.go +++ b/common/conf.go @@ -18,6 +18,7 @@ type Configuration struct { UpgradeToVersion string `json:"upgradeToVersion,omitempty" yaml:"upgradeToVersion,omitempty"` UpgradeFromVersion string `json:"upgradeFromVersion,omitempty" yaml:"upgradeFromVersion,omitempty"` RemoteDgraphRestoreUrl string `json:"remoteDgraphRestoreUrl,omitempty" yaml:"remoteDgraphRestoreUrl,omitempty"` + UpdateOnlyPolicies bool `json:"updateOnlyPolicies,omitempty" yaml:"updateOnlyPolicies,omitempty"` } const ( diff --git a/common/upgradeSteps.go b/common/upgradeSteps.go index e453a55..c8f072b 100644 --- a/common/upgradeSteps.go +++ b/common/upgradeSteps.go @@ -20,6 +20,10 @@ import ( func StartUpgrade() error { + if Conf.UpdateOnlyPolicies { + return upgradePoliciesAndFeat() + } + logger.Logger.Info("------------Starting Upgrade--------------------") logger.Logger.Info("------------Retrieve Schema from Prod Dgraph--------------------")