feat(build): add Cgo free database
This commit is contained in:
No files matched your search
@@ -2,7 +2,6 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
@@ -59,7 +58,6 @@ func (db *DB) Migrate(ctx MigrationContext) error {
|
||||
construct(ctx, "202206101425", migrateUser),
|
||||
construct(ctx, "202207251148", migrateStarRating),
|
||||
construct(ctx, "202211111057", migratePlaylistsQueuesToFullID),
|
||||
constructNoTx(ctx, "202212272312", backupDBPre016),
|
||||
construct(ctx, "202304221528", migratePlaylistsToM3U),
|
||||
construct(ctx, "202305301718", migratePlayCountToLength),
|
||||
construct(ctx, "202307281628", migrateAlbumArtistsMany2Many),
|
||||
@@ -738,13 +736,6 @@ func migratePlaylistsPaths(tx *gorm.DB, ctx MigrationContext) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func backupDBPre016(tx *gorm.DB, ctx MigrationContext) error {
|
||||
if !ctx.Production {
|
||||
return nil
|
||||
}
|
||||
return Dump(context.Background(), tx, fmt.Sprintf("%s.%d.bak", ctx.DBPath, time.Now().Unix()))
|
||||
}
|
||||
|
||||
func migrateAlbumTagArtistString(tx *gorm.DB, _ MigrationContext) error {
|
||||
return tx.AutoMigrate(Album{}).Error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user