package migrationsimport ("context""database/sql""github.com/pressly/goose/v3")func init() {goose.AddMigrationContext(Up20200423204116, Down20200423204116)}func Up20200423204116(_ context.Context, tx *sql.Tx) error {_, err := tx.Exec(`alter table artistadd order_artist_name varchar(255) collate nocase;alter table artistadd sort_artist_name varchar(255) collate nocase;create index if not exists artist_order_artist_nameon artist (order_artist_name);alter table albumadd order_album_name varchar(255) collate nocase;alter table albumadd order_album_artist_name varchar(255) collate nocase;alter table albumadd sort_album_name varchar(255) collate nocase;alter table albumadd sort_artist_name varchar(255) collate nocase;alter table albumadd sort_album_artist_name varchar(255) collate nocase;create index if not exists album_order_album_nameon album (order_album_name);create index if not exists album_order_album_artist_nameon album (order_album_artist_name);alter table media_fileadd order_album_name varchar(255) collate nocase;alter table media_fileadd order_album_artist_name varchar(255) collate nocase;alter table media_fileadd order_artist_name varchar(255) collate nocase;alter table media_fileadd sort_album_name varchar(255) collate nocase;alter table media_fileadd sort_artist_name varchar(255) collate nocase;alter table media_fileadd sort_album_artist_name varchar(255) collate nocase;alter table media_fileadd sort_title varchar(255) collate nocase;create index if not exists media_file_order_album_nameon media_file (order_album_name);create index if not exists media_file_order_artist_nameon media_file (order_artist_name);`)if err != nil {return err}notice(tx, "A full rescan will be performed to change the search behaviour")return forceFullRescan(tx)}func Down20200423204116(_ context.Context, tx *sql.Tx) error {return nil}