Skip to content

Soft Delete & Hard Delete #22

@sudowing

Description

@sudowing

Deleting user data isn't wise (putting GDPR & CCPR concerns aside). Users will delete things then submit help desk tickets stating the oppisite, some workflows will allow for bulk selections & deletes, which almost certainly lead to mistaken deletes and even engineers have removed records thinking they were in the lower environments. Soft Deletes are the solution here.

Original design was for soft delete by default (which is the toggling of an active flag).

Logic would detect boolean/bit field in tables and use that for toggling. Field name would have a default that's set as a config option (for standardized or new DBs using this pattern) or accept a config object that would define the flag field at a db resource level. If present -- it would implement soft delete.

Due to time -- currently only soft delete is enabled.

NOTE: Circling back to GDPR & CCPR concerns -- even if the user triggers are hard delete, I'd do so outside a blocking API call, likely using an async worker that calls some method provided by this feature -- which would force the hard delete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions