Skip to content

Commit

Permalink
fix: clickhouse mapping table use the same name as origin (#18887)
Browse files Browse the repository at this point in the history
Co-authored-by: Qiu Jian <[email protected]>
  • Loading branch information
swordqiu and Qiu Jian authored Dec 5, 2023
1 parent c51739e commit 168b7cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cloudcommon/db/modelbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func NewModelBaseManagerWithSplitableDBName(model interface{}, tableName string,
return modelMan
}

func NewModelBaseManagerWithClickhouseMapping(manager IModelManager, tblname, keyword, keywordPlural string) SModelBaseManager {
func NewModelBaseManagerWithClickhouseMapping(manager IModelManager, keyword, keywordPlural string) SModelBaseManager {
ots := manager.TableSpec()
var extraOpts sqlchemy.TableExtraOptions
switch consts.DefaultDBDialect() {
Expand All @@ -100,7 +100,7 @@ func NewModelBaseManagerWithClickhouseMapping(manager IModelManager, tblname, ke
default:
panic(fmt.Sprintf("unsupport dialect %s to be backend of clickhouse", consts.DefaultDBDialect()))
}
nts := newClickhouseTableSpecFromMySQL(ots, tblname, ClickhouseDB, extraOpts)
nts := newClickhouseTableSpecFromMySQL(ots, ots.Name(), ClickhouseDB, extraOpts)
modelMan := SModelBaseManager{
tableSpec: nts,
keyword: keyword,
Expand Down

0 comments on commit 168b7cd

Please sign in to comment.