Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85158526
20200808173046_only_expire_creates.exs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
604 B
Referenced Files
None
Subscribers
None
20200808173046_only_expire_creates.exs
View Options
# 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.OnlyExpireCreates
do
use
Ecto.Migration
def
up
do
statement
=
"""
DELETE FROM
activity_expirations a_exp USING activities a, objects o
WHERE
a_exp.activity_id = a.id AND (o.data->>'id') = COALESCE(a.data->'object'->>'id', a.data->>'object')
AND (a.data->>'type' != 'Create' OR o.data->>'type' != 'Note');
"""
execute
(
statement
)
end
def
down
do
:ok
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sun, Jun 28, 6:02 AM (3 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1629467
Default Alt Text
20200808173046_only_expire_creates.exs (604 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment