summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs
blob: 389935f0ddd362ab5f0048d7622c12f815aba2ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
defmodule Pleroma.Repo.Migrations.RemoveNonlocalExpirations do
  use Ecto.Migration

  def up do
    statement = """
    DELETE FROM
      activity_expirations A USING activities B
    WHERE
      A.activity_id = B.id
      AND B.local = false;
    """

    execute(statement)
  end

  def down do
    :ok
  end
end