Should ignore error when parsing default value for time, close #5176

This commit is contained in:
Jinzhu
2022-03-20 08:55:08 +08:00
parent 540b47571a
commit 0097b39a77
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ func TestPostgres(t *testing.T) {
Name string `gorm:"check:name_checker,name <> ''"`
Test uuid.UUID `gorm:"type:uuid;not null;default:gen_random_uuid()"`
CreatedAt time.Time `gorm:"type:TIMESTAMP WITHOUT TIME ZONE"`
UpdatedAt time.Time `gorm:"type:TIMESTAMP WITHOUT TIME ZONE"`
UpdatedAt time.Time `gorm:"type:TIMESTAMP WITHOUT TIME ZONE;default:current_timestamp"`
Things pq.StringArray `gorm:"type:text[]"`
}