summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20190405160700_add_index_on_subscribers.exs
blob: 4a43f5a3a3a26b844936390226420f33fed32d1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Repo.Migrations.AddIndexOnSubscribers do
  use Ecto.Migration

  @disable_ddl_transaction true
  def change do
    create(
      index(:users, ["(info->'subscribers')"],
        name: :users_subscribers_index,
        using: :gin,
        concurrently: true
      )
    )
  end
end