navidrome/db/migrations/20241025301254_remove_duplicate.go
2025-04-17 16:26:45 +01:00

27 lines
536 B
Go

package migrations
import (
"context"
"database/sql"
"github.com/pressly/goose/v3"
)
func init() {
goose.AddMigrationContext(upRemoveDuplicate, downRemoveDuplicate)
}
func upRemoveDuplicate(ctx context.Context, tx *sql.Tx) error {
// This code is executed when the migration is applied.
_, err := tx.Exec(`
alter table media_file
drop column is_duplicate;
`)
return err
}
func downRemoveDuplicate(ctx context.Context, tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}