summaryrefslogtreecommitdiffstats
path: root/vendor/xorm.io
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-09-30 04:08:44 +0800
committerGitHub <noreply@github.com>2021-09-29 23:08:44 +0300
commitba1fdbcfdb26ce7088a7eab0175e224e5325ef72 (patch)
tree130d19425d6d4accdd0cebfe0bc7ba70332579c6 /vendor/xorm.io
parentd30410675b81a07d5ba8a4e7f4d25732374a8fa8 (diff)
downloadgitea-ba1fdbcfdb26ce7088a7eab0175e224e5325ef72.tar.gz
gitea-ba1fdbcfdb26ce7088a7eab0175e224e5325ef72.zip
upgrade xorm to v1.2.5 (#17177)
Diffstat (limited to 'vendor/xorm.io')
-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
3 files changed, 4 insertions, 4 deletions
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 {