aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-09-30 14:03:42 +0800
committerGitHub <noreply@github.com>2021-09-30 07:03:42 +0100
commiteb5e6f09eb2a4dd4acdbf895504f0bb423fbf4ae (patch)
treec505694f778af433c9b70f940a0ebc30ae1935c2
parentbf6264c1dbb41344d7dd6f32ed5124279e7d8621 (diff)
downloadgitea-eb5e6f09eb2a4dd4acdbf895504f0bb423fbf4ae.tar.gz
gitea-eb5e6f09eb2a4dd4acdbf895504f0bb423fbf4ae.zip
upgrade xorm to v1.2.5 (#17177) (#17188)
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--vendor/modules.txt2
-rw-r--r--vendor/xorm.io/xorm/dialects/dialect.go2
-rw-r--r--vendor/xorm.io/xorm/dialects/mssql.go2
-rw-r--r--vendor/xorm.io/xorm/dialects/postgres.go4
6 files changed, 8 insertions, 8 deletions
diff --git a/go.mod b/go.mod
index fd6593c76c..3cac5e8079 100644
--- a/go.mod
+++ b/go.mod
@@ -139,7 +139,7 @@ require (
mvdan.cc/xurls/v2 v2.2.0
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
xorm.io/builder v0.3.9
- xorm.io/xorm v1.2.4
+ xorm.io/xorm v1.2.5
)
replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
diff --git a/go.sum b/go.sum
index 150a8f68bd..d0301701ab 100644
--- a/go.sum
+++ b/go.sum
@@ -1765,5 +1765,5 @@ xorm.io/builder v0.3.7/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
xorm.io/builder v0.3.9 h1:Sd65/LdWyO7LR8+Cbd+e7mm3sK/7U9k0jS3999IDHMc=
xorm.io/builder v0.3.9/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
xorm.io/xorm v1.0.6/go.mod h1:uF9EtbhODq5kNWxMbnBEj8hRRZnlcNSz2t2N7HW/+A4=
-xorm.io/xorm v1.2.4 h1:2MQV4wJt4kY6CYJsLxjCLzBen7+aqVxqDTIwfnR59g4=
-xorm.io/xorm v1.2.4/go.mod h1:fTG8tSjk6O1BYxwuohZUK+S1glnRycsCF05L1qQyEU0=
+xorm.io/xorm v1.2.5 h1:tqN7OhN8P9xi52qBb76I8m5maAJMz/SSbgK2RGPCPbo=
+xorm.io/xorm v1.2.5/go.mod h1:fTG8tSjk6O1BYxwuohZUK+S1glnRycsCF05L1qQyEU0=
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 6779534cc5..0e62e3643a 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1047,7 +1047,7 @@ strk.kbt.io/projects/go/libravatar
# xorm.io/builder v0.3.9
## explicit
xorm.io/builder
-# xorm.io/xorm v1.2.4
+# xorm.io/xorm v1.2.5
## explicit
xorm.io/xorm
xorm.io/xorm/caches
diff --git a/vendor/xorm.io/xorm/dialects/dialect.go b/vendor/xorm.io/xorm/dialects/dialect.go
index b6c0853ac4..c234f19a2f 100644
--- a/vendor/xorm.io/xorm/dialects/dialect.go
+++ b/vendor/xorm.io/xorm/dialects/dialect.go
@@ -206,7 +206,7 @@ func (db *Base) DropIndexSQL(tableName string, index *schemas.Index) string {
// ModifyColumnSQL returns a SQL to modify SQL
func (db *Base) ModifyColumnSQL(tableName string, col *schemas.Column) string {
s, _ := ColumnString(db.dialect, col, false)
- return fmt.Sprintf("ALTER TABLE %s MODIFY COLUMN %s", tableName, s)
+ return fmt.Sprintf("ALTER TABLE %s MODIFY COLUMN %s", db.quoter.Quote(tableName), s)
}
// ForUpdateSQL returns for updateSQL
diff --git a/vendor/xorm.io/xorm/dialects/mssql.go b/vendor/xorm.io/xorm/dialects/mssql.go
index ab010eb02a..323c2b8065 100644
--- a/vendor/xorm.io/xorm/dialects/mssql.go
+++ b/vendor/xorm.io/xorm/dialects/mssql.go
@@ -423,7 +423,7 @@ func (db *mssql) DropTableSQL(tableName string) (string, bool) {
func (db *mssql) ModifyColumnSQL(tableName string, col *schemas.Column) string {
s, _ := ColumnString(db.dialect, col, false)
- return fmt.Sprintf("ALTER TABLE %s ALTER COLUMN %s", tableName, s)
+ return fmt.Sprintf("ALTER TABLE %s ALTER COLUMN %s", db.quoter.Quote(tableName), s)
}
func (db *mssql) IndexCheckSQL(tableName, idxName string) (string, []interface{}) {
diff --git a/vendor/xorm.io/xorm/dialects/postgres.go b/vendor/xorm.io/xorm/dialects/postgres.go
index 6b5a8b2fab..2cc46371ed 100644
--- a/vendor/xorm.io/xorm/dialects/postgres.go
+++ b/vendor/xorm.io/xorm/dialects/postgres.go
@@ -988,10 +988,10 @@ func (db *postgres) IsTableExist(queryer core.Queryer, ctx context.Context, tabl
func (db *postgres) ModifyColumnSQL(tableName string, col *schemas.Column) string {
if len(db.getSchema()) == 0 || strings.Contains(tableName, ".") {
return fmt.Sprintf("alter table %s ALTER COLUMN %s TYPE %s",
- tableName, col.Name, db.SQLType(col))
+ db.quoter.Quote(tableName), db.quoter.Quote(col.Name), db.SQLType(col))
}
return fmt.Sprintf("alter table %s.%s ALTER COLUMN %s TYPE %s",
- db.getSchema(), tableName, col.Name, db.SQLType(col))
+ db.quoter.Quote(db.getSchema()), db.quoter.Quote(tableName), db.quoter.Quote(col.Name), db.SQLType(col))
}
func (db *postgres) DropIndexSQL(tableName string, index *schemas.Index) string {