Description
To support future synchronization logic, every task must store a lastUpdatedAt timestamp that is always populated and reflects when the task was last modified. Existing tasks must receive a sensible default during migration.
Scope and constraints
- In scope: add
lastUpdatedAt to Task, update the database schema and migration, backfill existing tasks with creationDate as default, update CreateTaskViewModel to set lastUpdatedAt on save.
- Out of scope: sync logic, UI changes, exposing
lastUpdatedAt to users.
References
Scope
- In scope:
Task entity, database migration, CreateTaskViewModel save flow, test updates.
- Out of scope: other ViewModels, UI display of
lastUpdatedAt.
Acceptance criteria
Additional information
CreateTaskViewModel currently constructs a Task in onSaveClick() with creationDate = timeProvider.now(). The new field should be populated with the same value on creation and on every edit.
- The Room/KMP migration may require a default-value SQL statement or an
AutoMigration depending on the current database configuration.
Description
To support future synchronization logic, every task must store a
lastUpdatedAttimestamp that is always populated and reflects when the task was last modified. Existing tasks must receive a sensible default during migration.Scope and constraints
lastUpdatedAttoTask, update the database schema and migration, backfill existing tasks withcreationDateas default, updateCreateTaskViewModelto setlastUpdatedAton save.lastUpdatedAtto users.References
Scope
Taskentity, database migration,CreateTaskViewModelsave flow, test updates.lastUpdatedAt.Acceptance criteria
Taskentity has a non-nullablelastUpdatedAt: InstantpropertylastUpdatedAtset to their existingcreationDateCreateTaskViewModelsetslastUpdatedAttotimeProvider.now()when creating or editing a taskAdditional information
CreateTaskViewModelcurrently constructs aTaskinonSaveClick()withcreationDate = timeProvider.now(). The new field should be populated with the same value on creation and on every edit.AutoMigrationdepending on the current database configuration.