Support various data retention policies
oubiwann opened this issue · comments
Duncan McGreggor commented
Due to the issue in #59, we're taking a more creative (and flexible) approach to deleting records.
0.7.0 Tasks:
- Add "active" and "deleted" fields to metadata
- Update
rm
command to not delete the record, but rather update the metadata- Note: this will close #59
- Add support for updating a record to "inactive" (
active=false
) - Add command to list deleted records
- Update listing displays to optionally include status (active, inactive, deleted)
- Add
set status
(active, inactive, deleted) subcommand
0.9.0 Tasks:
- Add config section
[retention]
- add option
purge_on_shutdown
(defaultfalse
) - add option
archive_deletes
(defaulttrue
) - add option
delete_inactive
(defaultfalse
)
- add option
- Add config section
[output]
- add option
show_inactive
- add option
show_deleted
- add option
- Add support for executing callbacks on shutdown
- Add logic and tests for new config options above:
- Add testing configs and the ability to use them for specific tests
- Add logic for scanning all records and completely removing those that have been labeled as deleted
- Add logic for scanning all inactive records and setting them to deleted
- Update output opts to add flags for showing inactive/deleted
- Update output results to show/hide based upon these flags
- Add/update subcommands
-
config re-init
- Rename
rm
module todelete
and rename the subcommand, too -
delete inactive
... note that this implies a two-stage delete process -
purge deleted
-
purge inactive
... this would skip the two stage process and go right to "delete"
-