upgrade xorm to v1.0.6 (#14246)

This commit is contained in:
Lunny Xiao 2021-01-05 14:28:51 +08:00 committed by GitHub
parent 8db0372a45
commit 126c9331d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 91 additions and 24 deletions

View file

@ -368,6 +368,11 @@ func (db *mssql) DropTableSQL(tableName string) (string, bool) {
"DROP TABLE \"%s\"", tableName, tableName), true
}
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)
}
func (db *mssql) IndexCheckSQL(tableName, idxName string) (string, []interface{}) {
args := []interface{}{idxName}
sql := "select name from sysindexes where id=object_id('" + tableName + "') and name=?"