From 90720233ebad869f7cd39a8b364fe3259e10a420 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 28 Feb 2024 20:01:54 +0200 Subject: [PATCH] less downtime --- migrations/20240228-fix-exact-searching.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migrations/20240228-fix-exact-searching.sql b/migrations/20240228-fix-exact-searching.sql index 4ea79040d3..e698335097 100644 --- a/migrations/20240228-fix-exact-searching.sql +++ b/migrations/20240228-fix-exact-searching.sql @@ -1,2 +1,3 @@ +alter table comments add column body_ts2 tsvector GENERATED ALWAYS AS (to_tsvector('simple'::regconfig, (body)::text)) STORED; alter table comments drop column body_ts; -alter table comments add column body_ts tsvector GENERATED ALWAYS AS (to_tsvector('simple'::regconfig, (body)::text)) STORED; +alter table comments rename column body_ts2 to body_ts;