fixes after rebasing with upstream/master (#3)

This commit is contained in:
laker-93 2025-01-02 08:09:25 +00:00 committed by GitHub
parent 8aaba56f0d
commit b3ded07500
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 25 additions and 26 deletions

View File

@ -1,25 +0,0 @@
package migrations
import (
"context"
"database/sql"
"github.com/pressly/goose/v3"
)
func init() {
goose.AddMigrationContext(upDuplicate, downDuplicate)
}
func upDuplicate(ctx context.Context, tx *sql.Tx) error {
_, err := tx.Exec(`
alter table media_file
add is_duplicate bool not null default false;
`)
return err
}
func downDuplicate(ctx context.Context, tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@ -0,0 +1,25 @@
package migrations
import (
"context"
"database/sql"
"github.com/pressly/goose/v3"
)
func init() {
goose.AddMigrationContext(upDuplicate, downDuplicate)
}
func upDuplicate(ctx context.Context, tx *sql.Tx) error {
_, err := tx.Exec(`
alter table media_file
add is_duplicate bool not null default false;
`)
return err
}
func downDuplicate(ctx context.Context, tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}

View File

@ -158,7 +158,6 @@ func (api *Router) routes() http.Handler {
h(r, "getLyricsBySongId", api.GetLyricsBySongId)
hr(r, "stream", api.Stream)
hr(r, "download", api.Download)
hr(r, "delete", api.Delete)
})
r.Group(func(r chi.Router) {
// configure request throttling