mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-23 14:00:03 +02:00
Upgrade xorm to v1.0.0 (#10646)
* Upgrade xorm to v1.0.0 * small nit * Fix tests * Update xorm * Update xorm * fix go.sum * fix test * Fix bug when dump * Fix bug * update xorm to latest * Fix migration test * update xorm to latest * Fix import order * Use xorm tag
This commit is contained in:
parent
dcaa5643d7
commit
c61b902538
154 changed files with 7195 additions and 5962 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"gopkg.in/testfixtures.v2"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
var fixtures *testfixtures.Context
|
||||
|
@ -36,7 +37,7 @@ func LoadFixtures() error {
|
|||
fmt.Printf("LoadFixtures failed after retries: %v\n", err)
|
||||
}
|
||||
// Now if we're running postgres we need to tell it to update the sequences
|
||||
if x.Dialect().DriverName() == "postgres" {
|
||||
if x.Dialect().URI().DBType == schemas.POSTGRES {
|
||||
results, err := x.QueryString(`SELECT 'SELECT SETVAL(' ||
|
||||
quote_literal(quote_ident(PGT.schemaname) || '.' || quote_ident(S.relname)) ||
|
||||
', COALESCE(MAX(' ||quote_ident(C.attname)|| '), 1) ) FROM ' ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue