From 08709cb34285e2ca815104cd5e889b4fd793b350 Mon Sep 17 00:00:00 2001 From: Vladislav Klimenko Date: Thu, 29 Feb 2024 15:09:13 +0300 Subject: [PATCH] dev: drop replica fmt --- pkg/model/chi/schemer/sql.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg/model/chi/schemer/sql.go b/pkg/model/chi/schemer/sql.go index 37287cd3e..83a30f365 100644 --- a/pkg/model/chi/schemer/sql.go +++ b/pkg/model/chi/schemer/sql.go @@ -230,14 +230,10 @@ func (s *ClusterSchemer) sqlCreateFunction(cluster string) string { } func (s *ClusterSchemer) sqlDropReplica(shard int, replica string) []string { - dropReplica := fmt.Sprintf("SYSTEM DROP REPLICA '%s'", replica) - dropDatabaseReplica := fmt.Sprintf("SYSTEM DROP DATABASE REPLICA '%d|%s'", shard, replica) - return []string{dropReplica, dropDatabaseReplica} - /* if s.version.Matches(">= 23.1") { - return []string{dropReplica, dropDatabaseReplica} - } else { - return []string{dropReplica} - }*/ + return []string{ + fmt.Sprintf("SYSTEM DROP REPLICA '%s'", replica), + fmt.Sprintf("SYSTEM DROP DATABASE REPLICA '%d|%s'", shard, replica), + } } func (s *ClusterSchemer) sqlDropDNSCache() string {