Database Migration
Datenbank-Migration
Eine Datenbank-Migration ist eine versionierte Änderung. Sie verschiebt gespeicherte Daten und ihr Schema von einem bekannten Zustand in einen anderen.
Ein weiteres Beispiel
Ein Release fügt zuerst ein timezone field hinzu, das leer sein darf. Es füllt alte Einträge und erzwingt die neue Bedingung später.
Hauptteile
- 01Identity or input
- 02Policy or transformation
- 03Stored result and audit evidence
Verwenden Sie es, wenn
Ändere Produktions-Daten in Schritten. Jeder Schritt sollte sichtbar und umkehrbar sein.
Nutze es nicht, wenn
Beweise vor einer zerstörerischen Änderung, dass Backups, Kompatibilität und Rollback funktionieren.
In Code verwendeter Name
migration up/down Vor dem Ausliefern
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome: Complete the task with Datenbank-Migration (Database Migration). User context: Ein Release fügt zuerst ein timezone field hinzu, das leer sein darf. Es füllt alte Einträge und erzwingt die neue Bedingung später. Technical concept or control: Datenbank-Migration (Database Migration). Why it fits: Ändere Produktions-Daten in Schritten. Jeder Schritt sollte sichtbar und umkehrbar sein. Do not use it when: Beweise vor einer zerstörerischen Änderung, dass Backups, Kompatibilität und Rollback funktionieren. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): Kein einziger offizieller Standard kontrolliert den gesamten Begriff. Seine Bedeutung kann sich zwischen Teams, Plattformen oder Frameworks ändern. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
Diese Anfrage prüfen
Review how Datenbank-Migration (Database Migration) is used now. Definition: Eine Datenbank-Migration ist eine versionierte Änderung. Sie verschiebt gespeicherte Daten und ihr Schema von einem bekannten Zustand in einen anderen. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.