-
Notifications
You must be signed in to change notification settings - Fork 2
Support column sanitisation in partially_delete clauses #1
Copy link
Copy link
Open
Description
[This isn't for immediate action - I'm just making a note here so I can follow up later.]
The gem supports a partially_delete option for tables, in which a subset of the table is deleted and the rest retained. The DSL block takes an allow call, and columns are validated in the usual way (i.e. all columns must be explicitly allowed):
partially_delete 'notifications' do
where notifiable_type: 'Mention'
allow 'id', 'user_id', 'notifiable_id', 'notifiable_type', 'read_at', 'created_at', 'grouped', 'group_id'
endBecause this block doesn't take a sanitise call, however, it means that partially-deleted tables must have all their columns whitelisted. It might be nice to support delete-then-sanitise. It's taking longer and longer to sanitise the staging DB, so we're likely to want to work with table subsets more in the future.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels