New column for encrypted data in preparation for full text search

This commit is contained in:
Magnus Åhall 2023-07-19 08:52:32 +02:00
parent b7c5a91c06
commit 57180e986e
3 changed files with 56 additions and 19 deletions

5
sql/0011.sql Normal file
View file

@ -0,0 +1,5 @@
ALTER TABLE node ADD COLUMN content_encrypted TEXT NOT NULL DEFAULT '';
UPDATE node SET content_encrypted = content, content = '' WHERE crypto_key_id IS NOT NULL;
CREATE EXTENSION pg_trgm;
CREATE INDEX node_content_index ON node USING gin (content gin_trgm_ops);