From e46ee901e46e88179e88ae0eefcead1e31063908 Mon Sep 17 00:00:00 2001 From: Karol Kokoszka Date: Thu, 15 Feb 2024 15:50:03 +0100 Subject: [PATCH] fix(db): update cluster table with coordinator_host column --- pkg/schema/table/table.go | 1 + pkg/service/cluster/model.go | 2 +- schema/v3.2.6.cql | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/schema/table/table.go b/pkg/schema/table/table.go index 5d5cce27a1..476c630a2d 100644 --- a/pkg/schema/table/table.go +++ b/pkg/schema/table/table.go @@ -70,6 +70,7 @@ var ( "port", "force_tls_disabled", "force_non_ssl_session_port", + "host", }, PartKey: []string{ "id", diff --git a/pkg/service/cluster/model.go b/pkg/service/cluster/model.go index 6bea7ba14a..b1c57b3c7b 100644 --- a/pkg/service/cluster/model.go +++ b/pkg/service/cluster/model.go @@ -15,7 +15,7 @@ import ( type Cluster struct { ID uuid.UUID `json:"id"` Name string `json:"name"` - Host string `json:"host" db:"-"` + Host string `json:"host"` KnownHosts []string `json:"-"` Port int `json:"port,omitempty"` AuthToken string `json:"auth_token"` diff --git a/schema/v3.2.6.cql b/schema/v3.2.6.cql index 8ab5e5f811..bca3c4daa0 100644 --- a/schema/v3.2.6.cql +++ b/schema/v3.2.6.cql @@ -1,2 +1,3 @@ ALTER TABLE cluster ADD force_tls_disabled BOOLEAN; -ALTER TABLE cluster ADD force_non_ssl_session_port BOOLEAN; \ No newline at end of file +ALTER TABLE cluster ADD force_non_ssl_session_port BOOLEAN; +ALTER TABLE cluster ADD host text; \ No newline at end of file