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--------------------")