mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-01-09 16:10:12 +00:00
Remove unused date columns
This commit is contained in:
parent
25dc70e0df
commit
9e479fbfdf
|
@ -105,11 +105,6 @@ func (w *webPushDB) PutWebPushSubscription(ctx context.Context, subscription *gt
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *webPushDB) UpdateWebPushSubscription(ctx context.Context, subscription *gtsmodel.WebPushSubscription, columns ...string) error {
|
func (w *webPushDB) UpdateWebPushSubscription(ctx context.Context, subscription *gtsmodel.WebPushSubscription, columns ...string) error {
|
||||||
// If we're updating by column, ensure "updated_at" is included.
|
|
||||||
if len(columns) > 0 {
|
|
||||||
columns = append(columns, "updated_at")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update database.
|
// Update database.
|
||||||
result, err := w.db.
|
result, err := w.db.
|
||||||
NewUpdate().
|
NewUpdate().
|
||||||
|
|
|
@ -17,22 +17,12 @@
|
||||||
|
|
||||||
package gtsmodel
|
package gtsmodel
|
||||||
|
|
||||||
import (
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// WebPushSubscription represents an access token's Web Push subscription.
|
// WebPushSubscription represents an access token's Web Push subscription.
|
||||||
// There can be at most one per access token.
|
// There can be at most one per access token.
|
||||||
type WebPushSubscription struct {
|
type WebPushSubscription struct {
|
||||||
// ID of this subscription in the database.
|
// ID of this subscription in the database.
|
||||||
ID string `bun:"type:CHAR(26),pk,nullzero,notnull,unique"`
|
ID string `bun:"type:CHAR(26),pk,nullzero,notnull,unique"`
|
||||||
|
|
||||||
// CreatedAt is the time this subscription was created.
|
|
||||||
CreatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"`
|
|
||||||
|
|
||||||
// UpdatedAt is the time this subscription was last updated.
|
|
||||||
UpdatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"`
|
|
||||||
|
|
||||||
// AccountID of the local account that created this subscription.
|
// AccountID of the local account that created this subscription.
|
||||||
AccountID string `bun:"type:CHAR(26),notnull,nullzero"`
|
AccountID string `bun:"type:CHAR(26),notnull,nullzero"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue