Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support column sanitisation in partially_delete clauses #1

Open
urbanautomaton opened this issue Oct 29, 2018 · 0 comments
Open

Support column sanitisation in partially_delete clauses #1

urbanautomaton opened this issue Oct 29, 2018 · 0 comments
Assignees

Comments

@urbanautomaton
Copy link
Contributor

[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'
end

Because 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.

@urbanautomaton urbanautomaton self-assigned this Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant