diff --git a/db/migration/20230114121537_touch_playlists.go b/db/migration/20230114121537_touch_playlists.go new file mode 100644 index 00000000..50a9b4da --- /dev/null +++ b/db/migration/20230114121537_touch_playlists.go @@ -0,0 +1,20 @@ +package migrations + +import ( + "database/sql" + + "github.com/pressly/goose" +) + +func init() { + goose.AddMigration(upTouchPlaylists, downTouchPlaylists) +} + +func upTouchPlaylists(tx *sql.Tx) error { + _, err := tx.Exec(`update playlist set updated_at = datetime('now');`) + return err +} + +func downTouchPlaylists(tx *sql.Tx) error { + return nil +}