aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/xorm.io/xorm/session_schema.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-03-25 22:32:23 +0800
committerGitHub <noreply@github.com>2020-03-25 16:32:23 +0200
commit73f5ca70de9254b3a031570de8a8a5f3ca00ed95 (patch)
tree2fc6a0b797ba58b21873d67dce23db649ae0072c /vendor/xorm.io/xorm/session_schema.go
parentb10cb7b258ec3bb5091a214a2ffeedec06c207ff (diff)
downloadgitea-73f5ca70de9254b3a031570de8a8a5f3ca00ed95.tar.gz
gitea-73f5ca70de9254b3a031570de8a8a5f3ca00ed95.zip
Upgrade xorm to v1.0.1 and fix start fail with potgres (#10819)
* upgrade xorm to v1.0.1 * fix start fail with postgres Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'vendor/xorm.io/xorm/session_schema.go')
-rw-r--r--vendor/xorm.io/xorm/session_schema.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/xorm.io/xorm/session_schema.go b/vendor/xorm.io/xorm/session_schema.go
index 84eb586ed7..9ccf8abee6 100644
--- a/vendor/xorm.io/xorm/session_schema.go
+++ b/vendor/xorm.io/xorm/session_schema.go
@@ -134,7 +134,7 @@ func (session *Session) dropTable(beanOrTableName interface{}) error {
tableName := session.engine.TableName(beanOrTableName)
sqlStr, checkIfExist := session.engine.dialect.DropTableSQL(session.engine.TableName(tableName, true))
if !checkIfExist {
- exist, err := session.engine.dialect.IsTableExist(session.ctx, tableName)
+ exist, err := session.engine.dialect.IsTableExist(session.getQueryer(), session.ctx, tableName)
if err != nil {
return err
}
@@ -160,7 +160,7 @@ func (session *Session) IsTableExist(beanOrTableName interface{}) (bool, error)
}
func (session *Session) isTableExist(tableName string) (bool, error) {
- return session.engine.dialect.IsTableExist(session.ctx, tableName)
+ return session.engine.dialect.IsTableExist(session.getQueryer(), session.ctx, tableName)
}
// IsTableEmpty if table have any records
@@ -187,7 +187,7 @@ func (session *Session) isTableEmpty(tableName string) (bool, error) {
// find if index is exist according cols
func (session *Session) isIndexExist2(tableName string, cols []string, unique bool) (bool, error) {
- indexes, err := session.engine.dialect.GetIndexes(session.ctx, tableName)
+ indexes, err := session.engine.dialect.GetIndexes(session.getQueryer(), session.ctx, tableName)
if err != nil {
return false, err
}
@@ -233,7 +233,7 @@ func (session *Session) Sync2(beans ...interface{}) error {
defer session.Close()
}
- tables, err := engine.dialect.GetTables(session.ctx)
+ tables, err := engine.dialect.GetTables(session.getQueryer(), session.ctx)
if err != nil {
return err
}