Using pgsodium with Ash
laznic:
Wondering if there would be an Ash way to do column encryption with pgsodium? Currently I have just done them directly in the migrations files with
execute("SECURITY LABEL FOR pgsodium ON COLUMN table.column IS 'ENCRYPT WITH KEY COLUMN key_id NONCE nonce ASSOCIATED association_id'")
for each column I want to get encrypted.
Would
custom_statements
in the Ash resource be the place to do this?
barnabasj:
Yes, putting it into custom_statements would put the SQL into the migration when generating it. I also did this for some generated columns
laznic:
Nice, thank you!