Skip to content

Instantly share code, notes, and snippets.

@ramses-lopez
Last active April 22, 2019 17:07
Show Gist options
  • Save ramses-lopez/13bb32626a49fc640e5d868d5967db59 to your computer and use it in GitHub Desktop.
Save ramses-lopez/13bb32626a49fc640e5d868d5967db59 to your computer and use it in GitHub Desktop.
Clear selected sessions from rails table
set bytea_output to 'escape';
-- delete
select session_id, decode(data, 'base64')::text
from sessions
where decode(data, 'base64')::text ilike '%return_to%'
and decode(data, 'base64')::text ilike '%password%new%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment