From 689449df9edf6f5ae32c732ef7d0661a20d52638 Mon Sep 17 00:00:00 2001 From: Deluan Date: Sat, 18 Apr 2020 11:08:54 -0400 Subject: [PATCH] Force reindex to fix album by year searches --- ...200418110522_reindex_to_fix_album_years.go | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 db/migration/20200418110522_reindex_to_fix_album_years.go diff --git a/db/migration/20200418110522_reindex_to_fix_album_years.go b/db/migration/20200418110522_reindex_to_fix_album_years.go new file mode 100644 index 00000000..328de59f --- /dev/null +++ b/db/migration/20200418110522_reindex_to_fix_album_years.go @@ -0,0 +1,20 @@ +package migration + +import ( + "database/sql" + "github.com/pressly/goose" +) + +func init() { + goose.AddMigration(Up20200418110522, Down20200418110522) +} + +func Up20200418110522(tx *sql.Tx) error { + notice(tx, "A full rescan will be performed to fix search Albums by year") + return forceFullRescan(tx) +} + +func Down20200418110522(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return nil +}