Skip to content

Commit

Permalink
dev: drop replica fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsingerus committed Feb 29, 2024
1 parent 3ec2782 commit 08709cb
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkg/model/chi/schemer/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 08709cb

Please sign in to comment.