scope: change modifyColumn so that it works with our postgres.

This commit is contained in:
Aleksandr Demakin 2021-11-01 13:20:29 +00:00
parent 33185a0333
commit 6060f45f1e

View File

@ -501,7 +501,7 @@ func (scope *Scope) dropTableIfExists() *Scope {
}
func (scope *Scope) modifyColumn(column string, typ string) {
scope.Raw(fmt.Sprintf("ALTER TABLE %v MODIFY %v %v", scope.QuotedTableName(), scope.Quote(column), typ)).Exec()
scope.Raw(fmt.Sprintf("ALTER TABLE %v ALTER %v set data type %v", scope.QuotedTableName(), scope.Quote(column), typ)).Exec()
}
func (scope *Scope) dropColumn(column string) {