mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 15:05:45 +00:00
Merge branch 'fix/incorrect-expirations' into 'develop'
Add a migration to clean up activity_expirations table See merge request pleroma/pleroma!2848
This commit is contained in:
commit
e8d10237da
|
@ -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