From 1efa2401aac2923f9c4045f19a34bc9d33b93cad Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Wed, 14 Aug 2024 18:06:37 +0800 Subject: [PATCH] fix: linting --- backend/impls/dalgorm/dalgorm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/impls/dalgorm/dalgorm.go b/backend/impls/dalgorm/dalgorm.go index 70d48e2bd21..59e6b115f6b 100644 --- a/backend/impls/dalgorm/dalgorm.go +++ b/backend/impls/dalgorm/dalgorm.go @@ -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}, )