[issue2551133] Allow roundup-admin pack <date> <designator+>
John Rouillard <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
New submission from John Rouillard:
In https://wiki.roundup-tracker.org/RemovingUsers deleting journal
entries for a user is part of clearing PII from the user.
Currently this needs to done using database commands (SQL).
This should be doable using roundup-admin.
Enhance the roundup-admin pack command to accept one or more
designators or classes to prune journal entries for those
objects or all objects in the class.
roundup-admin pack 0d user5
remove all journal entries for user5 starting now all the way
back to the create entry. The create entry will not be deleted.
roundup-admin pack 0d keywords
delete all journal entries except the create entry for all keywords.
roundup-admin pack 1y
delete all journal entries (except create entries) older than 1
year ago for all items in the database (this is the current
functionality).
Changes to: admin.py: do_pack,
backends/rdbms_common.py: pack,
backends/back_anydbm.py: pack
pack methods get new parameter array of designators. Use
hyperdb::splitDesignator to split into (class, id) tuples.
Sort by class and create array of id's.
Select/iterate over history for each class deleting matching id's.
For sql use: 'WHERE column_name IN (id1, id2, ...);' clause.
Basically process journal entries for a class once in anydbm
and use only one select statement for sql.
----------
components: Command-line interface, Database
keywords: Effort-Low
messages: 7228
nosy: rouilj
priority: normal
severity: normal
status: new
title: Allow roundup-admin pack <date> <designator+>
type: rfe
_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551133>
_________________________________________________