First
[anni] / priv / repo / migrations / 20170917120416_add_tag_index.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Repo.Migrations.AddTagIndex do
6   use Ecto.Migration
7
8   @disable_ddl_transaction true
9
10   def change do
11     create(
12       index(:activities, ["(data #> '{\"object\",\"tag\"}')"],
13         concurrently: true,
14         using: :gin,
15         name: :activities_tags
16       )
17     )
18   end
19 end