• Nick Thomas's avatar
    Correctly handle data-loss scenarios when encrypting columns · 6ddefe7c
    Nick Thomas authored
    If the EncryptColumns background migration runs in a sidekiq with a
    stale view of the database schema, or when the purported destination
    columns don't actually exist, data loss can result. Attempt to work
    around these issues by reloading schema information before running
    the migration, and raising errors if the model reports that any of its
    source or destination columns are missing.
attr_encrypted_no_db_connection_spec.rb 832 Bytes