Backup restore copies tables by column position

Offen
#2,044 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Wikid82 arbeitet bereits daran.

Seit 25.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

backend database

What: RehydrateLiveDatabase restores each table with INSERT INTO t SELECT * FROM restore_src.t, which matches columns by position. When a table's column order differs between the live database and the backup (for example a fresh install versus a database upgraded by adding a column, which appends it at the end), values can shift into the wrong columns without an error.

Where: backend/internal/services/backup_service.go:1600-1625.

Severity: medium.

Suggested approach: copy using the explicit list of column names that both schemas share, and add a test with differing column order.

Found during plan review of the encryption key work.

Vorherrschende Sprache
Go
Sterne
17
Forks
2
Ø Merge
1 Std. 42 Min.
Gemergte PRs (30 T.)
173

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Wikid82/Charon

Alle Issues in Wikid82/Charon

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.