I had a table with a text column named "secret_data" and I had to write a SQL migration like this:
sql="alter table blah alter column secret_data type bytea using private_key::bytea"
That took me a while to get right.
Also, that just changes the type -- it doesn't encrypt the data using the settings.SECRET_KEY. I'm still figuring out how to do this!
I had a table with a text column named "secret_data" and I had to write a SQL migration like this:
That took me a while to get right.
Also, that just changes the type -- it doesn't encrypt the data using the settings.SECRET_KEY. I'm still figuring out how to do this!