Skip to content

Commit

Permalink
fix: remove uuid autoincrement (#5620)
Browse files Browse the repository at this point in the history
  • Loading branch information
a631807682 authored and jinzhu committed Sep 22, 2022
1 parent 5d1d755 commit 73ee3ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/postgres_test.go
Expand Up @@ -63,13 +63,13 @@ func TestPostgres(t *testing.T) {
}

type Post struct {
ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();autoincrement"`
ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"`
Title string
Categories []*Category `gorm:"Many2Many:post_categories"`
}

type Category struct {
ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();autoincrement"`
ID uuid.UUID `gorm:"primary_key;type:uuid;default:uuid_generate_v4();"`
Title string
Posts []*Post `gorm:"Many2Many:post_categories"`
}
Expand Down

0 comments on commit 73ee3ff

Please sign in to comment.