fix: preservar datos y recuperar base local
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# Spec Delta
|
||||
|
||||
## Purpose
|
||||
|
||||
Protege los datos locales durante actualizaciones y ofrece una recuperación explícita cuando IndexedDB no puede abrirse o migrarse.
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Apertura explícita de base
|
||||
The system SHALL open and complete local database migrations before allowing operational views to run.
|
||||
|
||||
#### Scenario: Actualización compatible
|
||||
- **GIVEN** data exists in an older supported schema
|
||||
- **WHEN** the app starts after an update
|
||||
- **THEN** migrations complete before the main UI mounts
|
||||
- **AND** existing records remain available
|
||||
|
||||
### Requirement: Recuperación ante error
|
||||
The system SHALL show a recovery screen when the local database cannot be opened.
|
||||
|
||||
#### Scenario: Migración fallida
|
||||
- **WHEN** database opening fails
|
||||
- **THEN** the app shows an actionable error
|
||||
- **AND** no operational action is rendered as if data were empty
|
||||
- **AND** user can explicitly reset local data
|
||||
|
||||
### Requirement: Reset manual
|
||||
The system SHALL require explicit confirmation before deleting all local data.
|
||||
|
||||
#### Scenario: Reset confirmado
|
||||
- **WHEN** user confirms reset from maintenance
|
||||
- **THEN** local database is deleted and recreated on reload
|
||||
- **AND** the app starts with an empty environment
|
||||
Reference in New Issue
Block a user