mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: clickhouse mapping table use the same name as origin (#18888)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -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() {
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user