From 604489eb3881abf9761f0e8ce9f13544f3ab39d6 Mon Sep 17 00:00:00 2001 From: brookechen Date: Tue, 11 Jul 2023 16:42:49 +0800 Subject: [PATCH] cockroach db create table with integer column but get from db is bigint --- integrations/engine_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/integrations/engine_test.go b/integrations/engine_test.go index 751e3863..d0b293bf 100644 --- a/integrations/engine_test.go +++ b/integrations/engine_test.go @@ -290,7 +290,7 @@ func TestGetColumnsComment(t *testing.T) { } type TestCommentUpdate struct { - HasComment int `xorm:"comment('this is a comment before update')"` + HasComment int `xorm:"bigint comment('this is a comment before update')"` } func (m *TestCommentUpdate) TableName() string { @@ -298,7 +298,7 @@ func (m *TestCommentUpdate) TableName() string { } type TestCommentUpdate2 struct { - HasComment int `xorm:"comment('this is a comment after update')"` + HasComment int `xorm:"bigint comment('this is a comment after update')"` } func (m *TestCommentUpdate2) TableName() string { @@ -308,7 +308,7 @@ func (m *TestCommentUpdate2) TableName() string { func TestColumnCommentUpdate(t *testing.T) { comment := "this is a comment after update" assertSync(t, new(TestCommentUpdate)) - assert.NoError(t, testEngine.Sync(new(TestCommentUpdate2))) // modify table column comment + assert.NoError(t, testEngine.Sync2(new(TestCommentUpdate2))) // modify table column comment switch testEngine.Dialect().URI().DBType { case schemas.POSTGRES: // only postgres dialect implement the feature of modify comment in postgres.ModifyColumnSQL