quintodrome/db/migration/20230114121537_touch_playlists.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
398 B
Go
Raw Normal View History

package migrations
import (
2023-11-27 10:46:44 -09:00
"context"
"database/sql"
2023-04-04 05:57:00 -08:00
"github.com/pressly/goose/v3"
)
func init() {
2023-11-27 10:46:44 -09:00
goose.AddMigrationContext(upTouchPlaylists, downTouchPlaylists)
}
2023-11-27 10:46:44 -09:00
func upTouchPlaylists(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(`update playlist set updated_at = datetime('now');`)
return err
}
2023-11-27 10:46:44 -09:00
func downTouchPlaylists(_ context.Context, tx *sql.Tx) error {
return nil
}