fix:fix ci error 2

This commit is contained in:
lijunshi 2024-04-28 09:52:49 +08:00
parent 85d6a38a32
commit 16f6b54c95
1 changed files with 4 additions and 4 deletions

View File

@ -753,16 +753,16 @@ func getKeysFromMap(m map[string]*schemas.Index) []string {
}
func TestSync2_3(t *testing.T) {
{
func() {
type SyncTestUser struct {
Id int `xorm:"pk autoincr 'id'"`
Name string `xorm:"'name' notnull comment('nickname')" json:"name"`
}
assert.NoError(t, PrepareEngine())
assert.NoError(t, testEngine.Sync2(new(SyncTestUser)))
}
}()
{
func() {
// add comment for id column
type SyncTestUser struct {
Id int `xorm:"pk autoincr 'id' comment('primary key')"`
@ -780,6 +780,6 @@ func TestSync2_3(t *testing.T) {
assert.EqualValues(t, tables[0].GetColumn("id").Nullable, tableInfo.GetColumn("id").Nullable)
assert.EqualValues(t, tables[0].GetColumn("id").Comment, tableInfo.GetColumn("id").Comment)
assert.EqualValues(t, tables[0].GetColumn("id").IsPrimaryKey, tableInfo.GetColumn("id").IsPrimaryKey)
}
}()
}