bollwerk/Anforderungen/design/db-migration/requirements.md
Jens Reinemann a5f89e6a69 rename: Krisenvorrat -> Bollwerk
- Package: de.krisenvorrat.* -> de.bollwerk.*
- Klassen: KrisenvorratApp/Database/Theme -> Bollwerk*
- ApplicationId: de.bollwerk.app
- Server: BOLLWERK_* Env-Vars, bollwerk HOCON-Config
- Docker: bollwerk-server/db/backup Container-Namen
- Room DB: bollwerk.db, SharedPrefs: bollwerk_secure_prefs
- Export-Dateien: bollwerk_export/inventar
- UI-Strings, HTML, Admin-UI: alle auf Bollwerk
- Docs, Skills, README angepasst
- Alle Tests gruen, Build erfolgreich
2026-05-17 17:44:02 +02:00

32 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Technology Requirements DB-Migrationsstrategie
Date: 2026-05-17
Author: Bollwerk-Projekt
## Must-Have (eliminators)
- Datenerhaltung bei Schema-Änderungen (kein Datenverlust bei App-Updates)
- Kompatibel mit Room 2.6.1 (aktuell eingesetzte Version)
- Testbarkeit mit Room MigrationTestHelper
- Rückwärtskompatibilität mit bestehenden 4 manuellen Migrationen (V1→V5)
- Funktioniert mit minSdk 26 (SQLite 3.18 kein RENAME COLUMN, kein DROP COLUMN)
## Should-Have (weighted positives)
- Geringer Boilerplate für einfache Schema-Änderungen (ADD COLUMN, neue Tabelle)
- Compile-time Schema-Validierung
- Klare Entwickler-Checkliste (wann welcher Ansatz)
- Fehlervermeidung (vergessene Migration → Build-Fehler statt Runtime-Crash)
## Nice-to-Have (bonus)
- Automatische Schema-Diff-Generierung
- Minimaler manueller SQL-Aufwand für Standardfälle
## Constraints
- Plattform: Android (minSdk 26, targetSdk aktuell)
- Room 2.6.1 mit KSP
- Kotlin, Jetpack Compose
- SQLite 3.18 (API 26): ALTER TABLE RENAME COLUMN erst ab 3.25 (API 29), DROP COLUMN erst ab 3.35 (API 34)
- Bestehende manuelle Migrationen (V1→V2, V2→V3, V3→V4, V4→V5) müssen unverändert funktionieren