mirror of
https://github.com/gogs/gogs.git
synced 2026-05-07 13:25:56 +02:00
database: impersonate pure-Go SQLite driver as the old "sqlite3" (#8118)
This commit is contained in:
2
go.mod
2
go.mod
@@ -7,6 +7,7 @@ require (
|
||||
github.com/cockroachdb/errors v1.12.0
|
||||
github.com/derision-test/go-mockgen/v2 v2.1.1
|
||||
github.com/editorconfig/editorconfig-core-go/v2 v2.6.3
|
||||
github.com/glebarez/go-sqlite v1.21.2
|
||||
github.com/glebarez/sqlite v1.11.0
|
||||
github.com/go-ldap/ldap/v3 v3.4.11
|
||||
github.com/go-macaron/binding v1.2.0
|
||||
@@ -80,7 +81,6 @@ require (
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/getsentry/sentry-go v0.27.0 // indirect
|
||||
github.com/glebarez/go-sqlite v1.21.2 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/glebarez/go-sqlite"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/logger"
|
||||
log "unknwon.dev/clog/v2"
|
||||
@@ -45,6 +46,9 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Register the pure-Go SQLite driver as "sqlite3" for XORM compatibility.
|
||||
sql.Register("sqlite3", &sqlite.Driver{})
|
||||
|
||||
legacyTables = append(legacyTables,
|
||||
new(User), new(PublicKey), new(TwoFactor), new(TwoFactorRecoveryCode),
|
||||
new(Repository), new(DeployKey), new(Collaboration), new(Upload),
|
||||
|
||||
Reference in New Issue
Block a user