|
|
@ -20,7 +20,6 @@ defmodule Pleroma.Repo.Migrations.AddFtsIndexToObjectsTwo do
|
|
|
|
FOR EACH ROW EXECUTE PROCEDURE objects_fts_update()")
|
|
|
|
FOR EACH ROW EXECUTE PROCEDURE objects_fts_update()")
|
|
|
|
|
|
|
|
|
|
|
|
execute("UPDATE objects SET updated_at = NOW()")
|
|
|
|
execute("UPDATE objects SET updated_at = NOW()")
|
|
|
|
execute("vacuum analyze")
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def down do
|
|
|
|
def down do
|
|
|
@ -31,6 +30,5 @@ defmodule Pleroma.Repo.Migrations.AddFtsIndexToObjectsTwo do
|
|
|
|
remove(:fts_content, :tsvector)
|
|
|
|
remove(:fts_content, :tsvector)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
create index(:objects, ["(to_tsvector('english', data->>'content'))"], using: :gin, name: :objects_fts)
|
|
|
|
create index(:objects, ["(to_tsvector('english', data->>'content'))"], using: :gin, name: :objects_fts)
|
|
|
|
execute("vacuum analyze")
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|