working on the backup management parts

This commit is contained in:
Warp Agent
2025-12-29 02:44:52 +07:00
parent f1448d512c
commit fc64391cfb
20 changed files with 4897 additions and 249 deletions

View File

@@ -59,7 +59,7 @@ func RunMigrations(ctx context.Context, db *DB) error {
if _, err := tx.ExecContext(ctx, string(sql)); err != nil {
tx.Rollback()
return fmt.Errorf("failed to execute migration %s: %w", migration.Version, err)
return fmt.Errorf("failed to execute migration %d: %w", migration.Version, err)
}
// Record migration
@@ -68,11 +68,11 @@ func RunMigrations(ctx context.Context, db *DB) error {
migration.Version,
); err != nil {
tx.Rollback()
return fmt.Errorf("failed to record migration %s: %w", migration.Version, err)
return fmt.Errorf("failed to record migration %d: %w", migration.Version, err)
}
if err := tx.Commit(); err != nil {
return fmt.Errorf("failed to commit migration %s: %w", migration.Version, err)
return fmt.Errorf("failed to commit migration %d: %w", migration.Version, err)
}
log.Info("Migration applied successfully", "version", migration.Version)