From c9a1093af605d29e6db6dc9fd03247ba659706c0 Mon Sep 17 00:00:00 2001 From: fanybook Date: Fri, 5 Nov 2021 15:35:42 +0800 Subject: [PATCH] fixed hand error --- dialects/postgres.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dialects/postgres.go b/dialects/postgres.go index 25d9946b..3595f6c5 100644 --- a/dialects/postgres.go +++ b/dialects/postgres.go @@ -1003,8 +1003,8 @@ func (db *postgres) AddColumnSQL(tableName string, col *schemas.Column) string { return addColumnSQL + commentSQL } - addColumnSQL = fmt.Sprintf("ALTER TABLE %s.%s ADD %s", quoter.Quote(tableName), s) - commentSQL += fmt.Sprintf("COMMENT ON COLUMN %s.%s IS '%s'", quoter.Quote(db.getSchema()), quoter.Quote(tableName), quoter.Quote(col.Name), col.Comment) + addColumnSQL = fmt.Sprintf("ALTER TABLE %s.%s ADD %s", quoter.Quote(db.getSchema()), quoter.Quote(tableName), s) + commentSQL += fmt.Sprintf("COMMENT ON COLUMN %s.%s.%s IS '%s'", quoter.Quote(db.getSchema()), quoter.Quote(tableName), quoter.Quote(col.Name), col.Comment) return addColumnSQL + commentSQL }