Merge branch 'songquanpeng:main' into main

This commit is contained in:
Calcium-Ion
2023-10-30 16:12:09 +08:00
committed by GitHub
19 changed files with 99 additions and 45 deletions

View File

@@ -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