mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-06-22 10:02:15 +00:00
chore: upgrade to https://code.forgejo.org/xorm/xorm v1.4.0 (#12639)
Upgrade Forgejo to our forked [xorm v1.4.0](https://code.forgejo.org/xorm/xorm/compare/v1.3.9-forgejo.12...v1.4.0), which is now named `code.forgejo.org/xorm/xorm` to reflect the current expectation that it is a permanent fork. A small number of API changes were made recently in https://code.forgejo.org/xorm/xorm/issues/120 which are accounted for in this PR, in addition to the module rename. ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. All work and communication must conform to Forgejo's [AI Agreement](https://codeberg.org/forgejo/governance/src/branch/main/AIAgreement.md). There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change. - [x] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12639 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
parent
0ef80f6b0f
commit
29eddd311b
370 changed files with 421 additions and 438 deletions
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
type ActionUser struct {
|
||||
|
|
|
|||
10
assets/go-licenses.json
generated
10
assets/go-licenses.json
generated
File diff suppressed because one or more lines are too long
|
|
@ -22,8 +22,8 @@ import (
|
|||
"forgejo.org/modules/setting"
|
||||
"forgejo.org/modules/storage"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"github.com/urfave/cli/v3"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// CmdMigrateStorage represents the available migrate storage sub-command.
|
||||
|
|
|
|||
5
go.mod
5
go.mod
|
|
@ -16,6 +16,7 @@ require (
|
|||
code.forgejo.org/go-chi/cache v1.0.1
|
||||
code.forgejo.org/go-chi/captcha v1.0.2
|
||||
code.forgejo.org/go-chi/session v1.0.4
|
||||
code.forgejo.org/xorm/xorm v1.4.0
|
||||
code.gitea.io/sdk/gitea v0.21.0
|
||||
code.superseriousbusiness.org/exif-terminator v0.11.2
|
||||
code.superseriousbusiness.org/go-jpeg-image-structure/v2 v2.3.0
|
||||
|
|
@ -113,7 +114,6 @@ require (
|
|||
gopkg.in/ini.v1 v1.67.0
|
||||
mvdan.cc/xurls/v2 v2.6.0
|
||||
xorm.io/builder v0.3.13
|
||||
xorm.io/xorm v1.3.9
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
@ -185,7 +185,6 @@ require (
|
|||
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
||||
github.com/go-webauthn/x v0.2.3 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
|
||||
github.com/golang/snappy v1.0.0 // indirect
|
||||
github.com/google/btree v1.1.3 // indirect
|
||||
|
|
@ -268,5 +267,3 @@ replace github.com/mholt/archiver/v3 => code.forgejo.org/forgejo/archiver/v3 v3.
|
|||
replace github.com/gliderlabs/ssh => code.forgejo.org/forgejo/ssh v0.0.0-20241211213324-5fc306ca0616
|
||||
|
||||
replace git.sr.ht/~mariusor/go-xsd-duration => code.forgejo.org/forgejo/go-xsd-duration v0.0.0-20220703122237-02e73435a078
|
||||
|
||||
replace xorm.io/xorm v1.3.9 => code.forgejo.org/xorm/xorm v1.3.9-forgejo.12
|
||||
|
|
|
|||
18
go.sum
18
go.sum
|
|
@ -42,8 +42,8 @@ code.forgejo.org/go-chi/captcha v1.0.2 h1:vyHDPXkpjDv8bLO9NqtWzZayzstD/WpJ5xwEkA
|
|||
code.forgejo.org/go-chi/captcha v1.0.2/go.mod h1:lxiPLcJ76UCZHoH31/Wbum4GUi2NgjfFZLrJkKv1lLE=
|
||||
code.forgejo.org/go-chi/session v1.0.4 h1:WQ1NaVxcCpxYwCliEGypKclZnOCjh3p1fk8XciJc62U=
|
||||
code.forgejo.org/go-chi/session v1.0.4/go.mod h1:+sSTiomM5C8AUPtxZyTENIbcTz22kcVottKO0lnmDRk=
|
||||
code.forgejo.org/xorm/xorm v1.3.9-forgejo.12 h1:EodlU2MGu/EeAdUpEOe+X4cU/qlnJol1ucJ0sHUCM1o=
|
||||
code.forgejo.org/xorm/xorm v1.3.9-forgejo.12/go.mod h1:ozQINrM8b7uYFMBB/w19nUTTLcda3RKTQ8HspocVKdg=
|
||||
code.forgejo.org/xorm/xorm v1.4.0 h1:GCriXqUmpRWTWT2RyQy6ollwsNeKPaKQP+vwvGhwOM4=
|
||||
code.forgejo.org/xorm/xorm v1.4.0/go.mod h1:qmv9puvai7NQemIWf+qZSLpUn5VdCzGso9/KMcK7zCE=
|
||||
code.gitea.io/sdk/gitea v0.21.0 h1:69n6oz6kEVHRo1+APQQyizkhrZrLsTLXey9142pfkD4=
|
||||
code.gitea.io/sdk/gitea v0.21.0/go.mod h1:tnBjVhuKJCn8ibdyyhvUyxrR1Ca2KHEoTWoukNhXQPA=
|
||||
code.pfad.fr/check v1.1.0 h1:GWvjdzhSEgHvEHe2uJujDcpmZoySKuHQNrZMfzfO0bE=
|
||||
|
|
@ -334,8 +334,6 @@ github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJA
|
|||
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
|
||||
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
|
||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f h1:3BSP1Tbs2djlpprl7wCLuiqMaUh5SJkkzI2gDs+FgLs=
|
||||
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
|
||||
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 h1:UjoPNDAQ5JPCjlxoJd6K8ALZqSDDhk2ymieAZOVaDg0=
|
||||
|
|
@ -553,8 +551,6 @@ github.com/msteinert/pam/v2 v2.1.0 h1:er5F9TKV5nGFuTt12ubtqPHEUdeBwReP7vd3wovidG
|
|||
github.com/msteinert/pam/v2 v2.1.0/go.mod h1:KT28NNIcDFf3PcBmNI2mIGO4zZJ+9RSs/At2PB3IDVc=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
|
||||
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/niklasfasching/go-org v1.9.1 h1:/3s4uTPOF06pImGa2Yvlp24yKXZoTYM+nsIlMzfpg/0=
|
||||
github.com/niklasfasching/go-org v1.9.1/go.mod h1:ZAGFFkWvUQcpazmi/8nHqwvARpr1xpb+Es67oUGX/48=
|
||||
github.com/nwaples/rardecode/v2 v2.2.0 h1:4ufPGHiNe1rYJxYfehALLjup4Ls3ck42CWwjKiOqu0A=
|
||||
|
|
@ -608,8 +604,6 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg
|
|||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||
github.com/redis/go-redis/v9 v9.19.0 h1:XPVaaPSnG6RhYf7p+rmSa9zZfeVAnWsH5h3lxthOm/k=
|
||||
github.com/redis/go-redis/v9 v9.19.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rhysd/actionlint v1.7.10 h1:FL3XIEs72G4/++168vlv5FKOWMSWvWIQw1kBCadyOcM=
|
||||
github.com/rhysd/actionlint v1.7.10/go.mod h1:ZHX/hrmknlsJN73InPTKsKdXpAv9wVdrJy8h8HAwFHg=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
|
|
@ -991,14 +985,6 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
modernc.org/libc v1.72.0 h1:IEu559v9a0XWjw0DPoVKtXpO2qt5NVLAnFaBbjq+n8c=
|
||||
modernc.org/libc v1.72.0/go.mod h1:tTU8DL8A+XLVkEY3x5E/tO7s2Q/q42EtnNWda/L5QhQ=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
|
||||
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.50.0 h1:eMowQSWLK0MeiQTdmz3lqoF5dqclujdlIKeJA11+7oM=
|
||||
modernc.org/sqlite v1.50.0/go.mod h1:m0w8xhwYUVY3H6pSDwc3gkJ/irZT/0YEXwBlhaxQEew=
|
||||
mvdan.cc/xurls/v2 v2.6.0 h1:3NTZpeTxYVWNSokW3MKeyVkz/j7uYXYiMtXRUfmjbgI=
|
||||
mvdan.cc/xurls/v2 v2.6.0/go.mod h1:bCvEZ1XvdA6wDnxY7jPPjEmigDtvtvPXAD/Exa9IMSk=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ import (
|
|||
"forgejo.org/modules/structs"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
// ActionType represents the type of an action.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import (
|
|||
"forgejo.org/modules/git"
|
||||
"forgejo.org/modules/gitrepo"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
// ActivityAuthorData represents statistical git commit count data
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ import (
|
|||
"forgejo.org/modules/timeutil"
|
||||
"forgejo.org/modules/util"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
uuid "github.com/google/uuid"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// OAuth2Application represents an OAuth2 client (RFC 6749)
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ import (
|
|||
"forgejo.org/modules/timeutil"
|
||||
"forgejo.org/modules/util"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/convert"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/convert"
|
||||
)
|
||||
|
||||
// Type represents an login type.
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import (
|
|||
"forgejo.org/models/unittest"
|
||||
"forgejo.org/modules/json"
|
||||
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
type TestSource struct {
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
type CheckCollationsResult struct {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"fmt"
|
||||
"slices"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// DefaultContext is the default context to run xorm queries in
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
// ConvertDatabaseTable converts database and tables from utf8 to utf8mb4 if it's mysql and set ROW_FORMAT=dynamic
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/contexts"
|
||||
"xorm.io/xorm/names"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/contexts"
|
||||
"code.forgejo.org/xorm/xorm/names"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql" // Needed for the MySQL driver
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ import (
|
|||
|
||||
_ "forgejo.org/cmd" // for TestPrimaryKeys
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func TestDumpDatabase(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
"forgejo.org/modules/container"
|
||||
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
type schemaWithDefaultBean struct {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"forgejo.org/modules/log"
|
||||
|
||||
xormlog "xorm.io/xorm/log"
|
||||
xormlog "code.forgejo.org/xorm/xorm/log"
|
||||
)
|
||||
|
||||
// XORMLogBridge a logger bridge from Logger to xorm
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import (
|
|||
"forgejo.org/models/unittest"
|
||||
"forgejo.org/modules/optional"
|
||||
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
func TestOptionFieldInt(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import (
|
|||
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"code.forgejo.org/xorm/xorm/dialects"
|
||||
"github.com/jackc/pgx/v5/stdlib"
|
||||
"xorm.io/xorm/dialects"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"forgejo.org/modules/log"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// syncForeignKeyWithDelete will delete any records that match `cond`, and if present, log and warn to the
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func dropIndexIfExists(x *xorm.Engine, tableName, indexName string) error {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ import (
|
|||
"forgejo.org/modules/setting"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/names"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/names"
|
||||
)
|
||||
|
||||
// ForgejoMigration table contains a record of migrations applied to the database. (Note that there are older
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import (
|
|||
migration_tests "forgejo.org/models/gitea_migrations/test"
|
||||
"forgejo.org/modules/test"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func noOpMigration(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import (
|
|||
"forgejo.org/modules/timeutil"
|
||||
"forgejo.org/modules/validation"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import (
|
|||
"forgejo.org/modules/structs"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import (
|
|||
"forgejo.org/modules/setting"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/models/gitea_migrations/base"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import (
|
|||
migration_tests "forgejo.org/models/gitea_migrations/test"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
func Test_removeIsDeletedColumnFromActivityActionTable(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ package forgejo_migrations
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ package forgejo_migrations
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/modules/optional"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"forgejo.org/models/gitea_migrations/base"
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"forgejo.org/modules/json"
|
||||
"forgejo.org/modules/optional"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import (
|
|||
migration_tests "forgejo.org/models/gitea_migrations/test"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"code.forgejo.org/xorm/xorm/convert"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm/convert"
|
||||
)
|
||||
|
||||
func Test_setOIDCSubjectFormatLegacy15(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations
|
|||
import (
|
||||
"forgejo.org/modules/optional"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"forgejo.org/models/db"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/names"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/names"
|
||||
)
|
||||
|
||||
// ForgejoVersion describes the Forgejo version table. Should have only one row with id = 1.
|
||||
|
|
@ -191,7 +191,7 @@ func Migrate(x *xorm.Engine) error {
|
|||
// If the version record does not exist we think it is a fresh installation and we can skip all migrations;
|
||||
// engine init calls `SyncAllTables` which will create the fresh database.
|
||||
upToDate := &ForgejoVersion{ID: 1, Version: ExpectedVersion()}
|
||||
if _, err := x.InsertOne(upToDate); err != nil {
|
||||
if _, err := x.Insert(upToDate); err != nil {
|
||||
return fmt.Errorf("insert: %w", err)
|
||||
}
|
||||
// continue with the migration routine, but nothing will be applied; this allows transition into the newer
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import (
|
|||
migration_tests "forgejo.org/models/gitea_migrations/test"
|
||||
"forgejo.org/modules/test"
|
||||
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// TestEnsureUpToDate tests the behavior of EnsureUpToDate.
|
||||
|
|
@ -31,7 +31,7 @@ func TestEnsureUpToDate(t *testing.T) {
|
|||
require.Error(t, err)
|
||||
|
||||
// Insert 'good' Forgejo Version row.
|
||||
_, err = x.InsertOne(&ForgejoVersion{ID: 1, Version: ExpectedVersion()})
|
||||
_, err = x.Insert(&ForgejoVersion{ID: 1, Version: ExpectedVersion()})
|
||||
require.NoError(t, err)
|
||||
|
||||
err = EnsureUpToDate(x)
|
||||
|
|
@ -68,13 +68,13 @@ func TestMigrateFailWithCorruption(t *testing.T) {
|
|||
require.NotNil(t, x)
|
||||
|
||||
// ID != 1
|
||||
_, err := x.InsertOne(&ForgejoVersion{ID: 100, Version: 100})
|
||||
_, err := x.Insert(&ForgejoVersion{ID: 100, Version: 100})
|
||||
require.NoError(t, err)
|
||||
err = Migrate(x)
|
||||
require.ErrorContains(t, err, "corrupted records in the table `forgejo_version`")
|
||||
|
||||
// Two versions...
|
||||
_, err = x.InsertOne(&ForgejoVersion{ID: 1, Version: 1000})
|
||||
_, err = x.Insert(&ForgejoVersion{ID: 1, Version: 1000})
|
||||
require.NoError(t, err)
|
||||
err = Migrate(x)
|
||||
require.ErrorContains(t, err, "unexpected records in the table `forgejo_version`")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddHideArchiveLinksToRelease(x *xorm.Engine) error {
|
||||
type Release struct {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations_legacy
|
|||
import (
|
||||
"forgejo.org/models/gitea_migrations/base"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func RemoveGiteaSpecificColumnsFromRepositoryAndBadge(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
type FederatedUser struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddNormalizedFederatedURIToUser(x *xorm.Engine) error {
|
||||
type User struct {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
type FollowingRepo struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddExternalURLColumnToAttachmentTable(x *xorm.Engine) error {
|
||||
type Attachment struct {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_v1_20
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddForgejoBlockedUser(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
package forgejo_v1_20
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func CreateSemVerTable(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_v1_20
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
type AuthorizationToken struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package v1_22
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddPronounsToUser(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package v1_22
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddCreatedToIssue(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package v1_22
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddRepoArchiveDownloadCount(x *xorm.Engine) error {
|
||||
type RepoArchiveDownloadCount struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package v1_22
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddDefaultPermissionsToRepoUnit(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package v1_22
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
type RepoFlag struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package v1_22
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddWikiBranchToRepository(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package v1_22
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddUserRepoUnitHintsSetting(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package v1_22
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func RemoveSSHSignaturesFromReleaseNotes(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package v1_22
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddApplyToAdminsSetting(x *xorm.Engine) error {
|
||||
type ProtectedBranch struct {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
type (
|
||||
QuotaLimitSubject int
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddSSHKeypairToPushMirror(x *xorm.Engine) error {
|
||||
type PushMirror struct {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddLegacyToWebAuthnCredential(x *xorm.Engine) error {
|
||||
type WebauthnCredential struct {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
// AddDeleteBranchAfterMergeToAutoMerge: add DeleteBranchAfterMerge column, setting existing rows to false
|
||||
func AddDeleteBranchAfterMergeToAutoMerge(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddPurposeToForgejoAuthToken(x *xorm.Engine) error {
|
||||
type ForgejoAuthToken struct {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import (
|
|||
"forgejo.org/modules/secret"
|
||||
"forgejo.org/modules/setting"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
func MigrateTwoFactorToKeying(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddHashBlake2bToPackageBlob(x *xorm.Engine) error {
|
||||
type PackageBlob struct {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations_legacy
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddCreatedUnixToRedirect(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddHidePronounsOptionToUser(x *xorm.Engine) error {
|
||||
type User struct {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations_legacy
|
|||
import (
|
||||
"database/sql"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddPublicKeyInformationForFederation(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func MigrateNormalizedFederatedURI(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
migration_tests "forgejo.org/models/gitea_migrations/test"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
"github.com/stretchr/testify/require"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
|
||||
func Test_MigrateNormalizedFederatedURI(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
package forgejo_migrations_legacy
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
"code.forgejo.org/xorm/xorm/schemas"
|
||||
)
|
||||
|
||||
func SetTopicsAsEmptySlice(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"forgejo.org/modules/packages/maven"
|
||||
packages_service "forgejo.org/services/packages"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
var getPackage = packages_service.GetPackageFileStream
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"forgejo.org/modules/log"
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func dropOldFederationHostIndexes(x *xorm.Engine) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package forgejo_migrations_legacy
|
||||
|
||||
import "xorm.io/xorm"
|
||||
import "code.forgejo.org/xorm/xorm"
|
||||
|
||||
func AddNotifyEmailToActionRun(x *xorm.Engine) error {
|
||||
type ActionRun struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations_legacy
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
// see https://codeberg.org/forgejo/forgejo/issues/8373
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations_legacy
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func FixWikiUnitDefaultPermission(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
package forgejo_migrations_legacy
|
||||
|
||||
import (
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddPushMirrorBranchFilter(x *xorm.Engine) error {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ package forgejo_migrations_legacy
|
|||
import (
|
||||
"forgejo.org/modules/timeutil"
|
||||
|
||||
"xorm.io/xorm"
|
||||
"code.forgejo.org/xorm/xorm"
|
||||
)
|
||||
|
||||
func AddResolvedUnixToAbuseReport(x *xorm.Engine) error {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue