Merge branch 'v1' into lunny/vul_scan
This commit is contained in:
commit
ac5bc33fa8
|
@ -2,9 +2,10 @@ name: test cockroach
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- donttrigger # disabled for now
|
||||||
- v1
|
#- main
|
||||||
pull_request:
|
#- v1
|
||||||
|
#pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-cockroach:
|
test-cockroach:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
Xorm is a simple and powerful ORM for Go.
|
Xorm is a simple and powerful ORM for Go.
|
||||||
|
|
||||||
[](https://drone.gitea.com/xorm/xorm) [](https://gocover.io/xorm.io/xorm) [](https://goreportcard.com/report/xorm.io/xorm) [](https://discord.gg/HuR2CF3)
|
[](https://gitea.com/xorm/xorm/actions) [](https://gocover.io/xorm.io/xorm) [](https://goreportcard.com/report/xorm.io/xorm) [](https://discord.gg/HuR2CF3)
|
||||||
|
|
||||||
## Notice
|
## Notice
|
||||||
|
|
||||||
|
|
|
@ -684,6 +684,17 @@ func (db *oracle) IndexCheckSQL(tableName, idxName string) (string, []interface{
|
||||||
`WHERE TABLE_NAME = :1 AND INDEX_NAME = :2`, args
|
`WHERE TABLE_NAME = :1 AND INDEX_NAME = :2`, args
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (db *oracle) DropIndexSQL(tableName string, index *schemas.Index) string {
|
||||||
|
quote := db.dialect.Quoter().Quote
|
||||||
|
var name string
|
||||||
|
if index.IsRegular {
|
||||||
|
name = index.XName(tableName)
|
||||||
|
} else {
|
||||||
|
name = index.Name
|
||||||
|
}
|
||||||
|
return fmt.Sprintf("DROP INDEX %v", quote(name))
|
||||||
|
}
|
||||||
|
|
||||||
func (db *oracle) IsTableExist(queryer core.Queryer, ctx context.Context, tableName string) (bool, error) {
|
func (db *oracle) IsTableExist(queryer core.Queryer, ctx context.Context, tableName string) (bool, error) {
|
||||||
return db.HasRecords(queryer, ctx, `SELECT table_name FROM user_tables WHERE table_name = :1`, tableName)
|
return db.HasRecords(queryer, ctx, `SELECT table_name FROM user_tables WHERE table_name = :1`, tableName)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue