From 2f7968d680185c2bd7a95b1b93778239681fc39a Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Tue, 15 Jul 2025 20:23:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=20TryCreateTable?= =?UTF-8?q?=20=E5=87=BD=E6=95=B0=EF=BC=8C=E7=AE=80=E5=8C=96=20GORM=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlite3/gorm.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sqlite3/gorm.go b/sqlite3/gorm.go index 279a9e5..d3b03e3 100644 --- a/sqlite3/gorm.go +++ b/sqlite3/gorm.go @@ -26,11 +26,6 @@ func GetGormDB() *gorm.DB { return db } -// TryCreateTable 使用GORM执行原始SQL创建表语句 -func TryCreateTable(query string) error { - return GetGormDB().Exec(query).Error -} - // AutoMigrate 使用GORM的自动迁移功能 func AutoMigrate(models ...interface{}) error { return GetGormDB().AutoMigrate(models...)