Upgrade to Goose 3.15.1

This commit is contained in:
Deluan 2023-11-27 14:46:44 -05:00
parent 1b4483d32b
commit abde399e7b
69 changed files with 290 additions and 225 deletions

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/navidrome/navidrome/log" "github.com/navidrome/navidrome/log"
@ -8,10 +9,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(Up20200130083147, Down20200130083147) goose.AddMigrationContext(Up20200130083147, Down20200130083147)
} }
func Up20200130083147(tx *sql.Tx) error { func Up20200130083147(_ context.Context, tx *sql.Tx) error {
log.Info("Creating DB Schema") log.Info("Creating DB Schema")
_, err := tx.Exec(` _, err := tx.Exec(`
create table if not exists album create table if not exists album
@ -178,6 +179,6 @@ create table if not exists user
return err return err
} }
func Down20200130083147(tx *sql.Tx) error { func Down20200130083147(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200131183653, Down20200131183653) goose.AddMigrationContext(Up20200131183653, Down20200131183653)
} }
func Up20200131183653(tx *sql.Tx) error { func Up20200131183653(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table search_dg_tmp create table search_dg_tmp
( (
@ -36,7 +37,7 @@ update annotation set item_type = 'media_file' where item_type = 'mediaFile';
return err return err
} }
func Down20200131183653(tx *sql.Tx) error { func Down20200131183653(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table search_dg_tmp create table search_dg_tmp
( (

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200208222418, Down20200208222418) goose.AddMigrationContext(Up20200208222418, Down20200208222418)
} }
func Up20200208222418(tx *sql.Tx) error { func Up20200208222418(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
update annotation set play_count = 0 where play_count is null; update annotation set play_count = 0 where play_count is null;
update annotation set rating = 0 where rating is null; update annotation set rating = 0 where rating is null;
@ -50,6 +51,6 @@ create index annotation_starred
return err return err
} }
func Down20200208222418(tx *sql.Tx) error { func Down20200208222418(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200220143731, Down20200220143731) goose.AddMigrationContext(Up20200220143731, Down20200220143731)
} }
func Up20200220143731(tx *sql.Tx) error { func Up20200220143731(_ context.Context, tx *sql.Tx) error {
notice(tx, "This migration will force the next scan to be a full rescan!") notice(tx, "This migration will force the next scan to be a full rescan!")
_, err := tx.Exec(` _, err := tx.Exec(`
create table media_file_dg_tmp create table media_file_dg_tmp
@ -124,6 +125,6 @@ update media_file set updated_at = '0001-01-01';
return err return err
} }
func Down20200220143731(tx *sql.Tx) error { func Down20200220143731(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,20 +1,21 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200310171621, Down20200310171621) goose.AddMigrationContext(Up20200310171621, Down20200310171621)
} }
func Up20200310171621(tx *sql.Tx) error { func Up20200310171621(_ context.Context, tx *sql.Tx) error {
notice(tx, "A full rescan will be performed to enable search by Album Artist!") notice(tx, "A full rescan will be performed to enable search by Album Artist!")
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200310171621(tx *sql.Tx) error { func Down20200310171621(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200310181627, Down20200310181627) goose.AddMigrationContext(Up20200310181627, Down20200310181627)
} }
func Up20200310181627(tx *sql.Tx) error { func Up20200310181627(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table transcoding create table transcoding
( (
@ -44,7 +45,7 @@ create table player
return err return err
} }
func Down20200310181627(tx *sql.Tx) error { func Down20200310181627(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
drop table transcoding; drop table transcoding;
drop table player; drop table player;

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200319211049, Down20200319211049) goose.AddMigrationContext(Up20200319211049, Down20200319211049)
} }
func Up20200319211049(tx *sql.Tx) error { func Up20200319211049(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add full_text varchar(255) default ''; add full_text varchar(255) default '';
@ -36,6 +37,6 @@ drop table if exists search;
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200319211049(tx *sql.Tx) error { func Down20200319211049(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200325185135, Down20200325185135) goose.AddMigrationContext(Up20200325185135, Down20200325185135)
} }
func Up20200325185135(tx *sql.Tx) error { func Up20200325185135(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table album alter table album
add album_artist_id varchar(255) default ''; add album_artist_id varchar(255) default '';
@ -29,6 +30,6 @@ create index media_file_artist_album_id
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200325185135(tx *sql.Tx) error { func Down20200325185135(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,20 +1,21 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200326090707, Down20200326090707) goose.AddMigrationContext(Up20200326090707, Down20200326090707)
} }
func Up20200326090707(tx *sql.Tx) error { func Up20200326090707(_ context.Context, tx *sql.Tx) error {
notice(tx, "A full rescan will be performed!") notice(tx, "A full rescan will be performed!")
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200326090707(tx *sql.Tx) error { func Down20200326090707(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200327193744, Down20200327193744) goose.AddMigrationContext(Up20200327193744, Down20200327193744)
} }
func Up20200327193744(tx *sql.Tx) error { func Up20200327193744(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table album_dg_tmp create table album_dg_tmp
( (
@ -75,6 +76,6 @@ create index album_max_year
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200327193744(tx *sql.Tx) error { func Down20200327193744(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200404214704, Down20200404214704) goose.AddMigrationContext(Up20200404214704, Down20200404214704)
} }
func Up20200404214704(tx *sql.Tx) error { func Up20200404214704(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create index if not exists media_file_year create index if not exists media_file_year
on media_file (year); on media_file (year);
@ -24,6 +25,6 @@ create index if not exists media_file_track_number
return err return err
} }
func Down20200404214704(tx *sql.Tx) error { func Down20200404214704(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,20 +1,21 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200409002249, Down20200409002249) goose.AddMigrationContext(Up20200409002249, Down20200409002249)
} }
func Up20200409002249(tx *sql.Tx) error { func Up20200409002249(_ context.Context, tx *sql.Tx) error {
notice(tx, "A full rescan will be performed to enable search by individual Artist in an Album!") notice(tx, "A full rescan will be performed to enable search by individual Artist in an Album!")
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200409002249(tx *sql.Tx) error { func Down20200409002249(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200411164603, Down20200411164603) goose.AddMigrationContext(Up20200411164603, Down20200411164603)
} }
func Up20200411164603(tx *sql.Tx) error { func Up20200411164603(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table playlist alter table playlist
add created_at datetime; add created_at datetime;
@ -22,6 +23,6 @@ update playlist
return err return err
} }
func Down20200411164603(tx *sql.Tx) error { func Down20200411164603(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,20 +1,21 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200418110522, Down20200418110522) goose.AddMigrationContext(Up20200418110522, Down20200418110522)
} }
func Up20200418110522(tx *sql.Tx) error { func Up20200418110522(_ context.Context, tx *sql.Tx) error {
notice(tx, "A full rescan will be performed to fix search Albums by year") notice(tx, "A full rescan will be performed to fix search Albums by year")
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200418110522(tx *sql.Tx) error { func Down20200418110522(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,20 +1,21 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200419222708, Down20200419222708) goose.AddMigrationContext(Up20200419222708, Down20200419222708)
} }
func Up20200419222708(tx *sql.Tx) error { func Up20200419222708(_ context.Context, tx *sql.Tx) error {
notice(tx, "A full rescan will be performed to change the search behaviour") notice(tx, "A full rescan will be performed to change the search behaviour")
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200419222708(tx *sql.Tx) error { func Down20200419222708(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200423204116, Down20200423204116) goose.AddMigrationContext(Up20200423204116, Down20200423204116)
} }
func Up20200423204116(tx *sql.Tx) error { func Up20200423204116(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table artist alter table artist
add order_artist_name varchar(255) collate nocase; add order_artist_name varchar(255) collate nocase;
@ -60,6 +61,6 @@ create index if not exists media_file_order_artist_name
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200423204116(tx *sql.Tx) error { func Down20200423204116(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200508093059, Down20200508093059) goose.AddMigrationContext(Up20200508093059, Down20200508093059)
} }
func Up20200508093059(tx *sql.Tx) error { func Up20200508093059(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table artist alter table artist
add song_count integer default 0 not null; add song_count integer default 0 not null;
@ -22,6 +23,6 @@ alter table artist
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200508093059(tx *sql.Tx) error { func Down20200508093059(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200512104202, Down20200512104202) goose.AddMigrationContext(Up20200512104202, Down20200512104202)
} }
func Up20200512104202(tx *sql.Tx) error { func Up20200512104202(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add disc_subtitle varchar(255); add disc_subtitle varchar(255);
@ -22,6 +23,6 @@ alter table media_file
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20200512104202(tx *sql.Tx) error { func Down20200512104202(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"strings" "strings"
@ -9,10 +10,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(Up20200516140647, Down20200516140647) goose.AddMigrationContext(Up20200516140647, Down20200516140647)
} }
func Up20200516140647(tx *sql.Tx) error { func Up20200516140647(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table if not exists playlist_tracks create table if not exists playlist_tracks
( (
@ -95,6 +96,6 @@ func Up20200516140647UpdatePlaylistTracks(tx *sql.Tx, id string, tracks string)
return nil return nil
} }
func Down20200516140647(tx *sql.Tx) error { func Down20200516140647(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20200608153717, Down20200608153717) goose.AddMigrationContext(Up20200608153717, Down20200608153717)
} }
func Up20200608153717(tx *sql.Tx) error { func Up20200608153717(_ context.Context, tx *sql.Tx) error {
// First delete dangling players // First delete dangling players
_, err := tx.Exec(` _, err := tx.Exec(`
delete from player where user_name not in (select user_name from user)`) delete from player where user_name not in (select user_name from user)`)
@ -132,6 +133,6 @@ create unique index playlist_tracks_pos
return err return err
} }
func Down20200608153717(tx *sql.Tx) error { func Down20200608153717(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/google/uuid" "github.com/google/uuid"
@ -9,10 +10,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upAddDefaultTranscodings, downAddDefaultTranscodings) goose.AddMigrationContext(upAddDefaultTranscodings, downAddDefaultTranscodings)
} }
func upAddDefaultTranscodings(tx *sql.Tx) error { func upAddDefaultTranscodings(_ context.Context, tx *sql.Tx) error {
row := tx.QueryRow("SELECT COUNT(*) FROM transcoding") row := tx.QueryRow("SELECT COUNT(*) FROM transcoding")
var count int var count int
err := row.Scan(&count) err := row.Scan(&count)
@ -37,6 +38,6 @@ func upAddDefaultTranscodings(tx *sql.Tx) error {
return nil return nil
} }
func downAddDefaultTranscodings(tx *sql.Tx) error { func downAddDefaultTranscodings(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddPlaylistPath, downAddPlaylistPath) goose.AddMigrationContext(upAddPlaylistPath, downAddPlaylistPath)
} }
func upAddPlaylistPath(tx *sql.Tx) error { func upAddPlaylistPath(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table playlist alter table playlist
add path string default '' not null; add path string default '' not null;
@ -22,6 +23,6 @@ alter table playlist
return err return err
} }
func downAddPlaylistPath(tx *sql.Tx) error { func downAddPlaylistPath(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upCreatePlayQueuesTable, downCreatePlayQueuesTable) goose.AddMigrationContext(upCreatePlayQueuesTable, downCreatePlayQueuesTable)
} }
func upCreatePlayQueuesTable(tx *sql.Tx) error { func upCreatePlayQueuesTable(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table playqueue create table playqueue
( (
@ -31,6 +32,6 @@ create table playqueue
return err return err
} }
func downCreatePlayQueuesTable(tx *sql.Tx) error { func downCreatePlayQueuesTable(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upCreateBookmarkTable, downCreateBookmarkTable) goose.AddMigrationContext(upCreateBookmarkTable, downCreateBookmarkTable)
} }
func upCreateBookmarkTable(tx *sql.Tx) error { func upCreateBookmarkTable(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table bookmark create table bookmark
( (
@ -48,6 +49,6 @@ alter table playqueue_dg_tmp rename to playqueue;
return err return err
} }
func downCreateBookmarkTable(tx *sql.Tx) error { func downCreateBookmarkTable(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upDropEmailUniqueConstraint, downDropEmailUniqueConstraint) goose.AddMigrationContext(upDropEmailUniqueConstraint, downDropEmailUniqueConstraint)
} }
func upDropEmailUniqueConstraint(tx *sql.Tx) error { func upDropEmailUniqueConstraint(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table user_dg_tmp create table user_dg_tmp
( (
@ -37,6 +38,6 @@ alter table user_dg_tmp rename to user;
return err return err
} }
func downDropEmailUniqueConstraint(tx *sql.Tx) error { func downDropEmailUniqueConstraint(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201003111749, Down20201003111749) goose.AddMigrationContext(Up20201003111749, Down20201003111749)
} }
func Up20201003111749(tx *sql.Tx) error { func Up20201003111749(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create index if not exists annotation_starred_at create index if not exists annotation_starred_at
on annotation (starred_at); on annotation (starred_at);
@ -18,6 +19,6 @@ create index if not exists annotation_starred_at
return err return err
} }
func Down20201003111749(tx *sql.Tx) error { func Down20201003111749(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201010162350, Down20201010162350) goose.AddMigrationContext(Up20201010162350, Down20201010162350)
} }
func Up20201010162350(tx *sql.Tx) error { func Up20201010162350(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table album alter table album
add size integer default 0 not null; add size integer default 0 not null;
@ -27,7 +28,7 @@ where id not null;`)
return err return err
} }
func Down20201010162350(tx *sql.Tx) error { func Down20201010162350(_ context.Context, tx *sql.Tx) error {
// This code is executed when the migration is rolled back. // This code is executed when the migration is rolled back.
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201012210022, Down20201012210022) goose.AddMigrationContext(Up20201012210022, Down20201012210022)
} }
func Up20201012210022(tx *sql.Tx) error { func Up20201012210022(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table artist alter table artist
add size integer default 0 not null; add size integer default 0 not null;
@ -39,6 +40,6 @@ update playlist set size = ifnull((
return err return err
} }
func Down20201012210022(tx *sql.Tx) error { func Down20201012210022(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201021085410, Down20201021085410) goose.AddMigrationContext(Up20201021085410, Down20201021085410)
} }
func Up20201021085410(tx *sql.Tx) error { func Up20201021085410(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add mbz_track_id varchar(255); add mbz_track_id varchar(255);
@ -52,7 +53,7 @@ alter table artist
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20201021085410(tx *sql.Tx) error { func Down20201021085410(_ context.Context, tx *sql.Tx) error {
// This code is executed when the migration is rolled back. // This code is executed when the migration is rolled back.
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201021093209, Down20201021093209) goose.AddMigrationContext(Up20201021093209, Down20201021093209)
} }
func Up20201021093209(tx *sql.Tx) error { func Up20201021093209(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create index if not exists media_file_artist create index if not exists media_file_artist
on media_file (artist); on media_file (artist);
@ -22,6 +23,6 @@ create index if not exists media_file_mbz_track_id
return err return err
} }
func Down20201021093209(tx *sql.Tx) error { func Down20201021093209(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201021135455, Down20201021135455) goose.AddMigrationContext(Up20201021135455, Down20201021135455)
} }
func Up20201021135455(tx *sql.Tx) error { func Up20201021135455(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create index if not exists media_file_artist_id create index if not exists media_file_artist_id
on media_file (artist_id); on media_file (artist_id);
@ -18,6 +19,6 @@ create index if not exists media_file_artist_id
return err return err
} }
func Down20201021135455(tx *sql.Tx) error { func Down20201021135455(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddArtistImageUrl, downAddArtistImageUrl) goose.AddMigrationContext(upAddArtistImageUrl, downAddArtistImageUrl)
} }
func upAddArtistImageUrl(tx *sql.Tx) error { func upAddArtistImageUrl(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table artist alter table artist
add biography varchar(255) default '' not null; add biography varchar(255) default '' not null;
@ -30,6 +31,6 @@ alter table artist
return err return err
} }
func downAddArtistImageUrl(tx *sql.Tx) error { func downAddArtistImageUrl(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201110205344, Down20201110205344) goose.AddMigrationContext(Up20201110205344, Down20201110205344)
} }
func Up20201110205344(tx *sql.Tx) error { func Up20201110205344(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add comment varchar; add comment varchar;
@ -27,6 +28,6 @@ alter table album
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func Down20201110205344(tx *sql.Tx) error { func Down20201110205344(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(Up20201128100726, Down20201128100726) goose.AddMigrationContext(Up20201128100726, Down20201128100726)
} }
func Up20201128100726(tx *sql.Tx) error { func Up20201128100726(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table player alter table player
add report_real_path bool default FALSE not null; add report_real_path bool default FALSE not null;
@ -18,6 +19,6 @@ alter table player
return err return err
} }
func Down20201128100726(tx *sql.Tx) error { func Down20201128100726(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/navidrome/navidrome/log" "github.com/navidrome/navidrome/log"
@ -9,10 +10,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(Up20201213124814, Down20201213124814) goose.AddMigrationContext(Up20201213124814, Down20201213124814)
} }
func Up20201213124814(tx *sql.Tx) error { func Up20201213124814(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table album alter table album
add all_artist_ids varchar; add all_artist_ids varchar;
@ -58,6 +59,6 @@ select a.id, a.name, a.artist_id, a.album_artist_id, group_concat(mf.artist_id,
return rows.Err() return rows.Err()
} }
func Down20201213124814(tx *sql.Tx) error { func Down20201213124814(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddTimestampIndexesGo, downAddTimestampIndexesGo) goose.AddMigrationContext(upAddTimestampIndexesGo, downAddTimestampIndexesGo)
} }
func upAddTimestampIndexesGo(tx *sql.Tx) error { func upAddTimestampIndexesGo(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create index if not exists album_updated_at create index if not exists album_updated_at
on album (updated_at); on album (updated_at);
@ -28,6 +29,6 @@ create index if not exists media_file_updated_at
return err return err
} }
func downAddTimestampIndexesGo(tx *sql.Tx) error { func downAddTimestampIndexesGo(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"strings" "strings"
@ -10,10 +11,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upFixAlbumComments, downFixAlbumComments) goose.AddMigrationContext(upFixAlbumComments, downFixAlbumComments)
} }
func upFixAlbumComments(tx *sql.Tx) error { func upFixAlbumComments(_ context.Context, tx *sql.Tx) error {
//nolint:gosec //nolint:gosec
rows, err := tx.Query(` rows, err := tx.Query(`
SELECT album.id, group_concat(media_file.comment, '` + consts.Zwsp + `') FROM album, media_file WHERE media_file.album_id = album.id GROUP BY album.id; SELECT album.id, group_concat(media_file.comment, '` + consts.Zwsp + `') FROM album, media_file WHERE media_file.album_id = album.id GROUP BY album.id;
@ -48,7 +49,7 @@ func upFixAlbumComments(tx *sql.Tx) error {
return rows.Err() return rows.Err()
} }
func downFixAlbumComments(tx *sql.Tx) error { func downFixAlbumComments(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddBpmMetadata, downAddBpmMetadata) goose.AddMigrationContext(upAddBpmMetadata, downAddBpmMetadata)
} }
func upAddBpmMetadata(tx *sql.Tx) error { func upAddBpmMetadata(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add bpm integer; add bpm integer;
@ -25,6 +26,6 @@ create index if not exists media_file_bpm
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downAddBpmMetadata(tx *sql.Tx) error { func downAddBpmMetadata(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upCreateSharesTable, downCreateSharesTable) goose.AddMigrationContext(upCreateSharesTable, downCreateSharesTable)
} }
func upCreateSharesTable(tx *sql.Tx) error { func upCreateSharesTable(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table share create table share
( (
@ -29,6 +30,6 @@ create table share
return err return err
} }
func downCreateSharesTable(tx *sql.Tx) error { func downCreateSharesTable(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upUpdateShareFieldNames, downUpdateShareFieldNames) goose.AddMigrationContext(upUpdateShareFieldNames, downUpdateShareFieldNames)
} }
func upUpdateShareFieldNames(tx *sql.Tx) error { func upUpdateShareFieldNames(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table share rename column expires to expires_at; alter table share rename column expires to expires_at;
alter table share rename column created to created_at; alter table share rename column created to created_at;
@ -20,6 +21,6 @@ alter table share rename column last_visited to last_visited_at;
return err return err
} }
func downUpdateShareFieldNames(tx *sql.Tx) error { func downUpdateShareFieldNames(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -12,10 +12,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upEncodeAllPasswords, downEncodeAllPasswords) goose.AddMigrationContext(upEncodeAllPasswords, downEncodeAllPasswords)
} }
func upEncodeAllPasswords(tx *sql.Tx) error { func upEncodeAllPasswords(ctx context.Context, tx *sql.Tx) error {
rows, err := tx.Query(`SELECT id, user_name, password from user;`) rows, err := tx.Query(`SELECT id, user_name, password from user;`)
if err != nil { if err != nil {
return err return err
@ -38,7 +38,7 @@ func upEncodeAllPasswords(tx *sql.Tx) error {
return err return err
} }
password, err = utils.Encrypt(context.Background(), encKey, password) password, err = utils.Encrypt(ctx, encKey, password)
if err != nil { if err != nil {
log.Error("Error encrypting user's password", "id", id, "username", username, err) log.Error("Error encrypting user's password", "id", id, "username", username, err)
} }
@ -51,6 +51,6 @@ func upEncodeAllPasswords(tx *sql.Tx) error {
return rows.Err() return rows.Err()
} }
func downEncodeAllPasswords(tx *sql.Tx) error { func downEncodeAllPasswords(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upDropPlayerNameUniqueConstraint, downDropPlayerNameUniqueConstraint) goose.AddMigrationContext(upDropPlayerNameUniqueConstraint, downDropPlayerNameUniqueConstraint)
} }
func upDropPlayerNameUniqueConstraint(tx *sql.Tx) error { func upDropPlayerNameUniqueConstraint(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table player_dg_tmp create table player_dg_tmp
( (
@ -42,6 +43,6 @@ create index if not exists player_name
return err return err
} }
func downDropPlayerNameUniqueConstraint(tx *sql.Tx) error { func downDropPlayerNameUniqueConstraint(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddUserPrefsPlayerScrobblerEnabled, downAddUserPrefsPlayerScrobblerEnabled) goose.AddMigrationContext(upAddUserPrefsPlayerScrobblerEnabled, downAddUserPrefsPlayerScrobblerEnabled)
} }
func upAddUserPrefsPlayerScrobblerEnabled(tx *sql.Tx) error { func upAddUserPrefsPlayerScrobblerEnabled(_ context.Context, tx *sql.Tx) error {
err := upAddUserPrefs(tx) err := upAddUserPrefs(tx)
if err != nil { if err != nil {
return err return err
@ -39,6 +40,6 @@ alter table player add scrobble_enabled bool default true;
return err return err
} }
func downAddUserPrefsPlayerScrobblerEnabled(tx *sql.Tx) error { func downAddUserPrefsPlayerScrobblerEnabled(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddReferentialIntegrityToUserProps, downAddReferentialIntegrityToUserProps) goose.AddMigrationContext(upAddReferentialIntegrityToUserProps, downAddReferentialIntegrityToUserProps)
} }
func upAddReferentialIntegrityToUserProps(tx *sql.Tx) error { func upAddReferentialIntegrityToUserProps(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table user_props_dg_tmp create table user_props_dg_tmp
( (
@ -33,6 +34,6 @@ alter table user_props_dg_tmp rename to user_props;
return err return err
} }
func downAddReferentialIntegrityToUserProps(tx *sql.Tx) error { func downAddReferentialIntegrityToUserProps(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddScrobbleBuffer, downAddScrobbleBuffer) goose.AddMigrationContext(upAddScrobbleBuffer, downAddScrobbleBuffer)
} }
func upAddScrobbleBuffer(tx *sql.Tx) error { func upAddScrobbleBuffer(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table if not exists scrobble_buffer create table if not exists scrobble_buffer
( (
@ -33,6 +34,6 @@ create table if not exists scrobble_buffer
return err return err
} }
func downAddScrobbleBuffer(tx *sql.Tx) error { func downAddScrobbleBuffer(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddGenreTables, downAddGenreTables) goose.AddMigrationContext(upAddGenreTables, downAddGenreTables)
} }
func upAddGenreTables(tx *sql.Tx) error { func upAddGenreTables(_ context.Context, tx *sql.Tx) error {
notice(tx, "A full rescan will be performed to import multiple genres!") notice(tx, "A full rescan will be performed to import multiple genres!")
_, err := tx.Exec(` _, err := tx.Exec(`
create table if not exists genre create table if not exists genre
@ -63,6 +64,6 @@ create table if not exists artist_genres
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downAddGenreTables(tx *sql.Tx) error { func downAddGenreTables(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddMediafileChannels, downAddMediafileChannels) goose.AddMigrationContext(upAddMediafileChannels, downAddMediafileChannels)
} }
func upAddMediafileChannels(tx *sql.Tx) error { func upAddMediafileChannels(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add channels integer; add channels integer;
@ -25,6 +26,6 @@ create index if not exists media_file_channels
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downAddMediafileChannels(tx *sql.Tx) error { func downAddMediafileChannels(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddSmartPlaylist, downAddSmartPlaylist) goose.AddMigrationContext(upAddSmartPlaylist, downAddSmartPlaylist)
} }
func upAddSmartPlaylist(tx *sql.Tx) error { func upAddSmartPlaylist(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table playlist alter table playlist
add column rules varchar null; add column rules varchar null;
@ -32,6 +33,6 @@ create unique index playlist_fields_idx
return err return err
} }
func downAddSmartPlaylist(tx *sql.Tx) error { func downAddSmartPlaylist(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"strings" "strings"
@ -10,10 +11,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upAddOrderTitleToMediaFile, downAddOrderTitleToMediaFile) goose.AddMigrationContext(upAddOrderTitleToMediaFile, downAddOrderTitleToMediaFile)
} }
func upAddOrderTitleToMediaFile(tx *sql.Tx) error { func upAddOrderTitleToMediaFile(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table main.media_file alter table main.media_file
add order_title varchar null collate NOCASE; add order_title varchar null collate NOCASE;
@ -56,6 +57,6 @@ func upAddOrderTitleToMediaFile_populateOrderTitle(tx *sql.Tx) error {
return rows.Err() return rows.Err()
} }
func downAddOrderTitleToMediaFile(tx *sql.Tx) error { func downAddOrderTitleToMediaFile(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/navidrome/navidrome/log" "github.com/navidrome/navidrome/log"
@ -9,10 +10,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upUnescapeLyricsAndComments, downUnescapeLyricsAndComments) goose.AddMigrationContext(upUnescapeLyricsAndComments, downUnescapeLyricsAndComments)
} }
func upUnescapeLyricsAndComments(tx *sql.Tx) error { func upUnescapeLyricsAndComments(_ context.Context, tx *sql.Tx) error {
rows, err := tx.Query(`select id, comment, lyrics, title from media_file`) rows, err := tx.Query(`select id, comment, lyrics, title from media_file`)
if err != nil { if err != nil {
return err return err
@ -42,6 +43,6 @@ func upUnescapeLyricsAndComments(tx *sql.Tx) error {
return rows.Err() return rows.Err()
} }
func downUnescapeLyricsAndComments(tx *sql.Tx) error { func downUnescapeLyricsAndComments(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddUseridToPlaylist, downAddUseridToPlaylist) goose.AddMigrationContext(upAddUseridToPlaylist, downAddUseridToPlaylist)
} }
func upAddUseridToPlaylist(tx *sql.Tx) error { func upAddUseridToPlaylist(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table playlist_dg_tmp create table playlist_dg_tmp
( (
@ -55,6 +56,6 @@ create index playlist_updated_at
return err return err
} }
func downAddUseridToPlaylist(tx *sql.Tx) error { func downAddUseridToPlaylist(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddAlphabeticalByArtistIndex, downAddAlphabeticalByArtistIndex) goose.AddMigrationContext(upAddAlphabeticalByArtistIndex, downAddAlphabeticalByArtistIndex)
} }
func upAddAlphabeticalByArtistIndex(tx *sql.Tx) error { func upAddAlphabeticalByArtistIndex(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create index album_alphabetical_by_artist create index album_alphabetical_by_artist
ON album(compilation, order_album_artist_name, order_album_name) ON album(compilation, order_album_artist_name, order_album_name)
@ -18,6 +19,6 @@ create index album_alphabetical_by_artist
return err return err
} }
func downAddAlphabeticalByArtistIndex(tx *sql.Tx) error { func downAddAlphabeticalByArtistIndex(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,22 +1,23 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upRemoveInvalidArtistIds, downRemoveInvalidArtistIds) goose.AddMigrationContext(upRemoveInvalidArtistIds, downRemoveInvalidArtistIds)
} }
func upRemoveInvalidArtistIds(tx *sql.Tx) error { func upRemoveInvalidArtistIds(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
update media_file set artist_id = '' where not exists(select 1 from artist where id = artist_id) update media_file set artist_id = '' where not exists(select 1 from artist where id = artist_id)
`) `)
return err return err
} }
func downRemoveInvalidArtistIds(tx *sql.Tx) error { func downRemoveInvalidArtistIds(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddMusicbrainzReleaseTrackId, downAddMusicbrainzReleaseTrackId) goose.AddMigrationContext(upAddMusicbrainzReleaseTrackId, downAddMusicbrainzReleaseTrackId)
} }
func upAddMusicbrainzReleaseTrackId(tx *sql.Tx) error { func upAddMusicbrainzReleaseTrackId(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add mbz_release_track_id varchar(255); add mbz_release_track_id varchar(255);
@ -22,7 +23,7 @@ alter table media_file
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downAddMusicbrainzReleaseTrackId(tx *sql.Tx) error { func downAddMusicbrainzReleaseTrackId(_ context.Context, tx *sql.Tx) error {
// This code is executed when the migration is rolled back. // This code is executed when the migration is rolled back.
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddAlbumImagePaths, downAddAlbumImagePaths) goose.AddMigrationContext(upAddAlbumImagePaths, downAddAlbumImagePaths)
} }
func upAddAlbumImagePaths(tx *sql.Tx) error { func upAddAlbumImagePaths(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table main.album add image_files varchar; alter table main.album add image_files varchar;
`) `)
@ -21,6 +22,6 @@ alter table main.album add image_files varchar;
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downAddAlbumImagePaths(tx *sql.Tx) error { func downAddAlbumImagePaths(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upRemoveCoverArtId, downRemoveCoverArtId) goose.AddMigrationContext(upRemoveCoverArtId, downRemoveCoverArtId)
} }
func upRemoveCoverArtId(tx *sql.Tx) error { func upRemoveCoverArtId(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table album drop column cover_art_id; alter table album drop column cover_art_id;
alter table album rename column cover_art_path to embed_art_path alter table album rename column cover_art_path to embed_art_path
@ -22,6 +23,6 @@ alter table album rename column cover_art_path to embed_art_path
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downRemoveCoverArtId(tx *sql.Tx) error { func downRemoveCoverArtId(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"path/filepath" "path/filepath"
"strings" "strings"
@ -12,10 +13,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upAddAlbumPaths, downAddAlbumPaths) goose.AddMigrationContext(upAddAlbumPaths, downAddAlbumPaths)
} }
func upAddAlbumPaths(tx *sql.Tx) error { func upAddAlbumPaths(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(`alter table album add paths varchar;`) _, err := tx.Exec(`alter table album add paths varchar;`)
if err != nil { if err != nil {
return err return err
@ -62,6 +63,6 @@ func upAddAlbumPathsDirs(filePaths string) string {
return strings.Join(dirs, string(filepath.ListSeparator)) return strings.Join(dirs, string(filepath.ListSeparator))
} }
func downAddAlbumPaths(tx *sql.Tx) error { func downAddAlbumPaths(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,20 +1,21 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upTouchPlaylists, downTouchPlaylists) goose.AddMigrationContext(upTouchPlaylists, downTouchPlaylists)
} }
func upTouchPlaylists(tx *sql.Tx) error { func upTouchPlaylists(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(`update playlist set updated_at = datetime('now');`) _, err := tx.Exec(`update playlist set updated_at = datetime('now');`)
return err return err
} }
func downTouchPlaylists(tx *sql.Tx) error { func downTouchPlaylists(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upCreateInternetRadio, downCreateInternetRadio) goose.AddMigrationContext(upCreateInternetRadio, downCreateInternetRadio)
} }
func upCreateInternetRadio(tx *sql.Tx) error { func upCreateInternetRadio(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
create table if not exists radio create table if not exists radio
( (
@ -25,6 +26,6 @@ create table if not exists radio
return err return err
} }
func downCreateInternetRadio(tx *sql.Tx) error { func downCreateInternetRadio(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddReplaygainMetadata, downAddReplaygainMetadata) goose.AddMigrationContext(upAddReplaygainMetadata, downAddReplaygainMetadata)
} }
func upAddReplaygainMetadata(tx *sql.Tx) error { func upAddReplaygainMetadata(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file add alter table media_file add
rg_album_gain real; rg_album_gain real;
@ -29,6 +30,6 @@ alter table media_file add
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downAddReplaygainMetadata(tx *sql.Tx) error { func downAddReplaygainMetadata(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddAlbumInfo, downAddAlbumInfo) goose.AddMigrationContext(upAddAlbumInfo, downAddAlbumInfo)
} }
func upAddAlbumInfo(tx *sql.Tx) error { func upAddAlbumInfo(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table album alter table album
add description varchar(255) default '' not null; add description varchar(255) default '' not null;
@ -28,6 +29,6 @@ alter table album
return err return err
} }
func downAddAlbumInfo(tx *sql.Tx) error { func downAddAlbumInfo(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddMissingShareInfo, downAddMissingShareInfo) goose.AddMigrationContext(upAddMissingShareInfo, downAddMissingShareInfo)
} }
func upAddMissingShareInfo(tx *sql.Tx) error { func upAddMissingShareInfo(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
drop table if exists share; drop table if exists share;
create table share create table share
@ -36,6 +37,6 @@ create table share
return err return err
} }
func downAddMissingShareInfo(tx *sql.Tx) error { func downAddMissingShareInfo(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"path/filepath" "path/filepath"
"strings" "strings"
@ -12,10 +13,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upChangePathListSeparator, downChangePathListSeparator) goose.AddMigrationContext(upChangePathListSeparator, downChangePathListSeparator)
} }
func upChangePathListSeparator(tx *sql.Tx) error { func upChangePathListSeparator(_ context.Context, tx *sql.Tx) error {
//nolint:gosec //nolint:gosec
rows, err := tx.Query(` rows, err := tx.Query(`
select album_id, group_concat(path, '` + consts.Zwsp + `') from media_file group by album_id select album_id, group_concat(path, '` + consts.Zwsp + `') from media_file group by album_id
@ -57,6 +58,6 @@ func upChangePathListSeparatorDirs(filePaths string) string {
return strings.Join(dirs, consts.Zwsp) return strings.Join(dirs, consts.Zwsp)
} }
func downChangePathListSeparator(tx *sql.Tx) error { func downChangePathListSeparator(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,6 +1,7 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"path/filepath" "path/filepath"
"strings" "strings"
@ -12,11 +13,10 @@ import (
) )
func init() { func init() {
goose.AddMigration(upChangeImageFilesListSeparator, downChangeImageFilesListSeparator) goose.AddMigrationContext(upChangeImageFilesListSeparator, downChangeImageFilesListSeparator)
} }
func upChangeImageFilesListSeparator(tx *sql.Tx) error { func upChangeImageFilesListSeparator(_ context.Context, tx *sql.Tx) error {
//nolint:gosec
rows, err := tx.Query(`select id, image_files from album`) rows, err := tx.Query(`select id, image_files from album`)
if err != nil { if err != nil {
return err return err
@ -54,7 +54,7 @@ func upChangeImageFilesListSeparatorDirs(filePaths string) string {
return strings.Join(allPaths, consts.Zwsp) return strings.Join(allPaths, consts.Zwsp)
} }
func downChangeImageFilesListSeparator(tx *sql.Tx) error { func downChangeImageFilesListSeparator(_ context.Context, tx *sql.Tx) error {
// This code is executed when the migration is rolled back. // This code is executed when the migration is rolled back.
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddDownloadToShare, downAddDownloadToShare) goose.AddMigrationContext(upAddDownloadToShare, downAddDownloadToShare)
} }
func upAddDownloadToShare(tx *sql.Tx) error { func upAddDownloadToShare(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table share alter table share
add downloadable bool not null default false; add downloadable bool not null default false;
@ -18,6 +19,6 @@ alter table share
return err return err
} }
func downAddDownloadToShare(tx *sql.Tx) error { func downAddDownloadToShare(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upAddRelRecYear, downAddRelRecYear) goose.AddMigrationContext(upAddRelRecYear, downAddRelRecYear)
} }
func upAddRelRecYear(tx *sql.Tx) error { func upAddRelRecYear(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
add date varchar(255) default '' not null; add date varchar(255) default '' not null;
@ -44,6 +45,6 @@ alter table album
return forceFullRescan(tx) return forceFullRescan(tx)
} }
func downAddRelRecYear(tx *sql.Tx) error { func downAddRelRecYear(_ context.Context, tx *sql.Tx) error {
return nil return nil
} }

View file

@ -1,16 +1,17 @@
package migrations package migrations
import ( import (
"context"
"database/sql" "database/sql"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
) )
func init() { func init() {
goose.AddMigration(upRenameMusicbrainzRecordingId, downRenameMusicbrainzRecordingId) goose.AddMigrationContext(upRenameMusicbrainzRecordingId, downRenameMusicbrainzRecordingId)
} }
func upRenameMusicbrainzRecordingId(tx *sql.Tx) error { func upRenameMusicbrainzRecordingId(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
rename column mbz_track_id to mbz_recording_id; rename column mbz_track_id to mbz_recording_id;
@ -18,7 +19,7 @@ alter table media_file
return err return err
} }
func downRenameMusicbrainzRecordingId(tx *sql.Tx) error { func downRenameMusicbrainzRecordingId(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(` _, err := tx.Exec(`
alter table media_file alter table media_file
rename column mbz_recording_id to mbz_track_id; rename column mbz_recording_id to mbz_track_id;

4
go.mod
View file

@ -36,7 +36,7 @@ require (
github.com/mileusna/useragent v1.3.4 github.com/mileusna/useragent v1.3.4
github.com/onsi/ginkgo/v2 v2.13.1 github.com/onsi/ginkgo/v2 v2.13.1
github.com/onsi/gomega v1.30.0 github.com/onsi/gomega v1.30.0
github.com/pressly/goose/v3 v3.11.2 github.com/pressly/goose/v3 v3.15.1
github.com/prometheus/client_golang v1.17.0 github.com/prometheus/client_golang v1.17.0
github.com/robfig/cron/v3 v3.0.1 github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.9.3 github.com/sirupsen/logrus v1.9.3
@ -91,7 +91,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect github.com/prometheus/procfs v0.12.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/segmentio/asm v1.2.0 // indirect github.com/segmentio/asm v1.2.0 // indirect
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect

40
go.sum
View file

@ -270,8 +270,8 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v
github.com/matoous/go-nanoid v1.5.0/go.mod h1:zyD2a71IubI24efhpvkJz+ZwfwagzgSO6UNiFsZKN7U= github.com/matoous/go-nanoid v1.5.0/go.mod h1:zyD2a71IubI24efhpvkJz+ZwfwagzgSO6UNiFsZKN7U=
github.com/matoous/go-nanoid/v2 v2.0.0 h1:d19kur2QuLeHmJBkvYkFdhFBzLoo1XVm2GgTpL+9Tj0= github.com/matoous/go-nanoid/v2 v2.0.0 h1:d19kur2QuLeHmJBkvYkFdhFBzLoo1XVm2GgTpL+9Tj0=
github.com/matoous/go-nanoid/v2 v2.0.0/go.mod h1:FtS4aGPVfEkxKxhdWPAspZpZSh1cOjtM7Ej/So3hR0g= github.com/matoous/go-nanoid/v2 v2.0.0/go.mod h1:FtS4aGPVfEkxKxhdWPAspZpZSh1cOjtM7Ej/So3hR0g=
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI=
github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
@ -302,8 +302,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.11.2 h1:QgTP45FhBBHdmf7hWKlbWFHtwPtxo0phSDkwDKGUrYs= github.com/pressly/goose/v3 v3.15.1 h1:dKaJ1SdLvS/+HtS8PzFT0KBEtICC1jewLXM+b3emlv8=
github.com/pressly/goose/v3 v3.11.2/go.mod h1:LWQzSc4vwfHA/3B8getTp8g3J5Z8tFBxgxinmGlMlJk= github.com/pressly/goose/v3 v3.15.1/go.mod h1:0E3Yg/+EwYzO6Rz2P98MlClFgIcoujbVRs575yi3iIM=
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@ -311,8 +311,8 @@ github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLq
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
@ -746,22 +746,22 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo=
lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q=
modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y=
modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0=
modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI=
modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= modernc.org/libc v1.24.1 h1:uvJSeCKL/AgzBo2yYIPPTy82v21KgGnizcGYfBHaNuM=
modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= modernc.org/libc v1.24.1/go.mod h1:FmfO1RLrU3MHJfyi9eYYmZBfi/R+tqZ6+hQ3yQQUkak=
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/sqlite v1.22.1 h1:P2+Dhp5FR1RlVRkQ3dDfCiv3Ok8XPxqpe70IjYVA9oE= modernc.org/sqlite v1.26.0 h1:SocQdLRSYlA8W99V8YH0NES75thx19d9sB/aFc4R8Lw=
modernc.org/sqlite v1.22.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= modernc.org/sqlite v1.26.0/go.mod h1:FL3pVXie73rg3Rii6V/u5BoHlSoyeZeIgKZEgHARyCU=
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=