From af732a98bf347f5da5f598275832591a8b6a2aa0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Jan 2024 09:26:08 +0800 Subject: [PATCH] update --- types/dbtables/auto_create_table.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/types/dbtables/auto_create_table.go b/types/dbtables/auto_create_table.go index dd42e19..61dff06 100644 --- a/types/dbtables/auto_create_table.go +++ b/types/dbtables/auto_create_table.go @@ -1,34 +1,15 @@ package dbtables import ( - "github.com/yzimhao/trading_engine/utils/app" "xorm.io/xorm" ) func AutoCreateTable(db *xorm.Session, bean any) error { table := db.Engine().TableName(bean) - - app.Logger.Debugf("auto create table_name: %s", table) - if !Exist(db, table) { if err := db.Engine().Sync2(bean); err != nil { return err } - - // err := db.CreateTable(bean) - // if err != nil { - // return err - // } - - // err = db.CreateIndexes(bean) - // if err != nil { - // return err - // } - - // err = db.CreateUniques(bean) - // if err != nil { - // return err - // } } return nil }