Skip to content

Commit 90273fe

Browse files
committed
clickhouse: Quote db name in ensureVersionTable
1 parent 31791ad commit 90273fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/clickhouse/clickhouse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (ch *ClickHouse) ensureVersionTable() (err error) {
220220

221221
var (
222222
table string
223-
query = "SHOW TABLES FROM " + ch.config.DatabaseName + " LIKE '" + ch.config.MigrationsTable + "'"
223+
query = "SHOW TABLES FROM \"" + ch.config.DatabaseName + "\" LIKE '" + ch.config.MigrationsTable + "'"
224224
)
225225
// check if migration table exists
226226
if err := ch.conn.QueryRow(query).Scan(&table); err != nil {

0 commit comments

Comments
 (0)