Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
klesh committed Aug 14, 2024
1 parent 17f9467 commit 1efa240
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/impls/dalgorm/dalgorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,12 @@ func (d *Dalgorm) ModifyColumnType(table, columnName, columnType string) errors.
defer func() {
_ = d.Exec("SELECT * FROM ? LIMIT 1", clause.Table{Name: table})
}()
sql := "ALTER TABLE ? MODIFY COLUMN ? %s"
query := "ALTER TABLE ? MODIFY COLUMN ? %s"
if d.db.Dialector.Name() == "postgres" {
sql = "ALTER TABLE ? ALTER COLUMN ? TYPE %s"
query = "ALTER TABLE ? ALTER COLUMN ? TYPE %s"
}
return d.Exec(
fmt.Sprintf(sql, columnType),
fmt.Sprintf(query, columnType),
clause.Table{Name: table},
clause.Column{Name: columnName},
)
Expand Down

0 comments on commit 1efa240

Please sign in to comment.