mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 03:17:51 +00:00
Add a migration to clean up activity_expirations table
This commit is contained in:
parent
917aa090f0
commit
079e410d6e
1 changed files with 19 additions and 0 deletions
|
@ -0,0 +1,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
|
Loading…
Reference in a new issue