Skip to content

Commit

Permalink
clickhouse: Quote db name in ensureVersionTable
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-nardelli committed Nov 29, 2022
1 parent 31791ad commit 90273fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/clickhouse/clickhouse.go
Expand Up @@ -220,7 +220,7 @@ func (ch *ClickHouse) ensureVersionTable() (err error) {

var (
table string
query = "SHOW TABLES FROM " + ch.config.DatabaseName + " LIKE '" + ch.config.MigrationsTable + "'"
query = "SHOW TABLES FROM \"" + ch.config.DatabaseName + "\" LIKE '" + ch.config.MigrationsTable + "'"
)
// check if migration table exists
if err := ch.conn.QueryRow(query).Scan(&table); err != nil {
Expand Down

0 comments on commit 90273fe

Please sign in to comment.