diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-03-25 22:32:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-25 16:32:23 +0200 |
commit | 73f5ca70de9254b3a031570de8a8a5f3ca00ed95 (patch) | |
tree | 2fc6a0b797ba58b21873d67dce23db649ae0072c /vendor/xorm.io/xorm/session_schema.go | |
parent | b10cb7b258ec3bb5091a214a2ffeedec06c207ff (diff) | |
download | gitea-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.go | 8 |
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 } |