You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1Panel/backend/init/db/sqlite.go

18 lines
276 B

package db
import (
"github.com/1Panel-dev/1Panel/global"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
)
func SqliteGorm() *gorm.DB {
s := global.CONF.Sqlite
if db, err := gorm.Open(sqlite.Open(s.Dsn()), &gorm.Config{}); err != nil {
panic(err)
} else {
return db
}
}