riboseinc / transcryptor

Assists your everyday re-encryption needs, in Rails.
MIT License
2 stars 1 forks source link

Allow transcryption of targeted rows #31

Closed ribose-jeffreylau closed 7 years ago

ribose-jeffreylau commented 7 years ago

Currently, there's no way to specify the range of rows to run transcryption on. Thus, in the case of failure in the middle of a transcryption, or some other unfortunate situations where there are rows under the old encryption config and some other rows under the new config, there's no tool provided to fix them.

I propose to extend Transcryptor::*::ReEncryptStatement#re_encrypt_column with a way to specify additional SELECT clauses, perhaps as AREL / String (maybe via Transcyptor::AbstractAdapter#select_rows(table_name, columns)?).