fix clickhouse goose table name (#270)

pull/274/head
Konstantin Grigorev 2021-08-21 05:54:08 +03:00 committed by GitHub
parent d15e25ab59
commit e976a731b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -293,14 +293,12 @@ func (m TiDBDialect) deleteVersionSQL() string {
type ClickHouseDialect struct{}
func (m ClickHouseDialect) createVersionTableSQL() string {
return `
CREATE TABLE goose_db_version (
return fmt.Sprintf(`CREATE TABLE %s (
version_id Int64,
is_applied UInt8,
date Date default now(),
tstamp DateTime default now()
) Engine = MergeTree(date, (date), 8192)
`
) Engine = MergeTree(date, (date), 8192)`, TableName())
}
func (m ClickHouseDialect) dbVersionQuery(db *sql.DB) (*sql.Rows, error) {