mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[feat]网关子设备,直接上传,自动创建设备模型,无需手动创建
This commit is contained in:
@@ -45,7 +45,7 @@ func (s *TdEngine) CreateStable(table string) (err error) {
|
||||
|
||||
// CreateTable 添加子表
|
||||
func (s *TdEngine) CreateTable(stable, table string) (err error) {
|
||||
sql := fmt.Sprintf("CREATE TABLE %s USING %s TAGS ('%s')", table, stable, table)
|
||||
sql := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s USING %s TAGS ('%s')", table, stable, table)
|
||||
_, err = s.db.Exec(sql)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user