初始化项目, 添加sqlite3的支持
This commit is contained in:
1 parent
c973d6819c
commit
90eaf46478
3 files changed
+6
No files matched your search
@@ -23,3 +23,4 @@ cmd/migrate/migration/version-local/*
|
||||
# go sum
|
||||
go.sum
|
||||
config/settings.deva.yml
|
||||
sqlite3.db
|
||||
@@ -6,6 +6,7 @@ package database
|
||||
import (
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/driver/postgres"
|
||||
"gorm.io/driver/sqlite"
|
||||
"gorm.io/driver/sqlserver"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -14,4 +15,5 @@ var opens = map[string]func(string) gorm.Dialector{
|
||||
"mysql": mysql.Open,
|
||||
"postgres": postgres.Open,
|
||||
"sqlserver": sqlserver.Open,
|
||||
"sqlite3": sqlite.Open,
|
||||
}
|
||||
@@ -47,6 +47,7 @@ require (
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/chanxuehong/rand v0.0.0-20201110082127-2f19a1bdd973 // indirect
|
||||
github.com/chanxuehong/wechat v0.0.0-20201110083048-0180211b69fd // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
|
||||
github.com/denisenkom/go-mssqldb v0.12.0 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/fatih/color v1.9.0 // indirect
|
||||
@@ -110,7 +111,9 @@ require (
|
||||
github.com/prometheus/common v0.26.0 // indirect
|
||||
github.com/prometheus/procfs v0.6.0 // indirect
|
||||
github.com/robinjoseph08/redisqueue/v2 v2.1.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.0.1 // indirect
|
||||
github.com/shamsher31/goimgext v1.0.0 // indirect
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||
github.com/spf13/cast v1.3.1 // indirect
|
||||
github.com/spf13/pflag v1.0.3 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.9 // indirect
|
||||
|
||||
Reference in new issue
Block a user