mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 16:13:16 -06:00
remove media_attachments.updated_at column
This commit is contained in:
parent
d1db703e5b
commit
736d45db7f
11 changed files with 134 additions and 90 deletions
|
|
@ -104,12 +104,6 @@ func (m *mediaDB) PutAttachment(ctx context.Context, media *gtsmodel.MediaAttach
|
|||
}
|
||||
|
||||
func (m *mediaDB) UpdateAttachment(ctx context.Context, media *gtsmodel.MediaAttachment, columns ...string) error {
|
||||
media.UpdatedAt = time.Now()
|
||||
if len(columns) > 0 {
|
||||
// If we're updating by column, ensure "updated_at" is included.
|
||||
columns = append(columns, "updated_at")
|
||||
}
|
||||
|
||||
return m.state.Caches.DB.Media.Store(media, func() error {
|
||||
_, err := m.db.NewUpdate().
|
||||
Model(media).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue