Make column-rename RDBMS DDL MySQL compatible

This commit is contained in:
Denis Arh
2022-09-30 10:14:37 +02:00
parent 25d23b740c
commit e95970d33d
+1 -1
View File
@@ -261,7 +261,7 @@ func (c *DropIndex) ToSQL() (sql string, aa []interface{}, err error) {
func (c *RenameColumn) ToSQL() (sql string, aa []interface{}, err error) {
return fmt.Sprintf(
`ALTER TABLE %s RENAME %s TO %s`,
`ALTER TABLE %s RENAME COLUMN %s TO %s`,
c.Dialect.QuoteIdent(c.Table),
c.Dialect.QuoteIdent(c.Old),
c.Dialect.QuoteIdent(c.New),