π Migrate attr_encrypted to Rails 7 Active Record encrypts
Rails 7 has introduced Active Record Encryption, functionality to transparently encrypt and decrypt data before storing it in the database. This is awesome news for any developer who has ever had to encrypt data before storing it.
Now arriving in Rails 7: Active Record Encryption, created by @jorgemanru. Designed for, and extracted from, @heyhey email. https://t.co/PMW0ROojX1
β Jeremy Daer (@bitsweat) April 1, 2021
In this guide, I will walk you through an example to migrate from away from using attr_encrypted gem to the new Rails 7 Active Record encrypts. We will do this using strong migrations and also maintain the ability to perform a database rollback without data loss.
