mirror of
https://github.com/linux-do/new-api.git
synced 2025-12-26 08:35:58 +08:00
Merge branch 'songquanpeng:main' into main
This commit is contained in:
@@ -42,6 +42,7 @@ func chooseDB() (*gorm.DB, error) {
|
||||
if strings.HasPrefix(dsn, "postgres://") {
|
||||
// Use PostgreSQL
|
||||
common.SysLog("using PostgreSQL as database")
|
||||
common.UsingPostgreSQL = true
|
||||
return gorm.Open(postgres.New(postgres.Config{
|
||||
DSN: dsn,
|
||||
PreferSimpleProtocol: true, // disables implicit prepared statement usage
|
||||
|
||||
Reference in New Issue
Block a user