diff options
author | lain <lain@soykaf.club> | 2020-08-05 08:55:39 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-08-05 08:55:39 +0000 |
commit | e8d10237da47f81bcb3837ac8b5d1b7cc7bf540c (patch) | |
tree | aed1a3ffe43b7fe138a366b77ad7dab1c6a83cf6 | |
parent | bd157b7369fc5aaff1ec7ed66fb1bb41fdfd1491 (diff) | |
parent | 079e410d6efcb39e72a238c13e52bd1898b442a2 (diff) | |
download | pleroma-e8d10237da47f81bcb3837ac8b5d1b7cc7bf540c.tar.gz |
Merge branch 'fix/incorrect-expirations' into 'develop'
Add a migration to clean up activity_expirations table
See merge request pleroma/pleroma!2848
-rw-r--r-- | priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs b/priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs new file mode 100644 index 000000000..389935f0d --- /dev/null +++ b/priv/repo/migrations/20200804180322_remove_nonlocal_expirations.exs @@ -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 |