Using pgsodium with Ash

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?
2 Replies
barnabasj
barnabasj2y ago
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
laznicOP2y ago
Nice, thank you!

Did you find this page helpful?