From eaa5d10e28fdf7dd3f519e6a094f36d16bc63022 Mon Sep 17 00:00:00 2001 From: zhangchenhao Date: Fri, 9 May 2025 19:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B=E5=8C=96sq?= =?UTF-8?q?lite=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/migrations/init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/migrations/init.go b/backend/migrations/init.go index 7ba6642..e56f8fb 100644 --- a/backend/migrations/init.go +++ b/backend/migrations/init.go @@ -4,7 +4,7 @@ import ( "ALLinSSL/backend/public" "database/sql" "fmt" - _ "github.com/mattn/go-sqlite3" + _ "modernc.org/sqlite" "os" "path/filepath" ) @@ -16,7 +16,7 @@ func init() { _, _ = filepath.Abs(dbPath) os.WriteFile(dbPath, []byte{}, 0644) // fmt.Println("数据库路径:", absPath) - db, err := sql.Open("sqlite3", dbPath) + db, err := sql.Open("sqlite", dbPath) if err != nil { // fmt.Println("创建数据库失败:", err) return