mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 17:17:19 +00:00
Use created & updated instead BeforeInsert & BeforeUpdate (#2482)
* use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
This commit is contained in:
@ -86,13 +86,7 @@ type Action struct {
|
||||
IsPrivate bool `xorm:"INDEX NOT NULL DEFAULT false"`
|
||||
Content string `xorm:"TEXT"`
|
||||
Created time.Time `xorm:"-"`
|
||||
CreatedUnix int64 `xorm:"INDEX"`
|
||||
}
|
||||
|
||||
// BeforeInsert will be invoked by XORM before inserting a record
|
||||
// representing this object.
|
||||
func (a *Action) BeforeInsert() {
|
||||
a.CreatedUnix = time.Now().Unix()
|
||||
CreatedUnix int64 `xorm:"INDEX created"`
|
||||
}
|
||||
|
||||
// AfterSet updates the webhook object upon setting a column.
|
||||
|
Reference in New Issue
Block a user