Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85630035
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/priv/repo/migrations/20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs b/priv/repo/migrations/20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs
index 0d68a0787..86e02df01 100644
--- a/priv/repo/migrations/20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs
+++ b/priv/repo/migrations/20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs
@@ -1,37 +1,10 @@
defmodule Pleroma.Repo.Migrations.UploadFilterExiftoolToExiftoolStripMetadata do
use Ecto.Migration
- alias Pleroma.ConfigDB
-
- def up,
- do:
- ConfigDB.get_by_params(%{group: :pleroma, key: Pleroma.Upload})
- |> update_filtername(
- Pleroma.Upload.Filter.Exiftool,
- Pleroma.Upload.Filter.Exiftool.StripMetadata
- )
-
- def down,
- do:
- ConfigDB.get_by_params(%{group: :pleroma, key: Pleroma.Upload})
- |> update_filtername(
- Pleroma.Upload.Filter.Exiftool.StripMetadata,
- Pleroma.Upload.Filter.Exiftool
- )
-
- defp update_filtername(%{value: value}, from_filtername, to_filtername) do
- new_value =
- value
- |> Keyword.update(:filters, [], fn filters ->
- filters
- |> Enum.map(fn
- ^from_filtername -> to_filtername
- filter -> filter
- end)
- end)
-
- ConfigDB.update_or_create(%{group: :pleroma, key: Pleroma.Upload, value: new_value})
- end
-
- defp update_filtername(_, _, _), do: nil
+ # 20240425120000_upload_filter_exiftool_to_exiftool_strip_location.exs
+ # was originally committed with the id used in this file, but this breaks
+ # rollback order. Thus it was moved to 20240425120000 and this stub just prevents
+ # errors during large-scale rollbacks for anyone who already applied the old id
+ def up, do: :ok
+ def down, do: :ok
end
diff --git a/priv/repo/migrations/20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs b/priv/repo/migrations/20240425120000_upload_filter_exiftool_to_exiftool_strip_location_real.exs
similarity index 97%
copy from priv/repo/migrations/20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs
copy to priv/repo/migrations/20240425120000_upload_filter_exiftool_to_exiftool_strip_location_real.exs
index 0d68a0787..5d2b880db 100644
--- a/priv/repo/migrations/20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs
+++ b/priv/repo/migrations/20240425120000_upload_filter_exiftool_to_exiftool_strip_location_real.exs
@@ -1,37 +1,37 @@
-defmodule Pleroma.Repo.Migrations.UploadFilterExiftoolToExiftoolStripMetadata do
+defmodule Pleroma.Repo.Migrations.UploadFilterExiftoolToExiftoolStripMetadataReal do
use Ecto.Migration
alias Pleroma.ConfigDB
def up,
do:
ConfigDB.get_by_params(%{group: :pleroma, key: Pleroma.Upload})
|> update_filtername(
Pleroma.Upload.Filter.Exiftool,
Pleroma.Upload.Filter.Exiftool.StripMetadata
)
def down,
do:
ConfigDB.get_by_params(%{group: :pleroma, key: Pleroma.Upload})
|> update_filtername(
Pleroma.Upload.Filter.Exiftool.StripMetadata,
Pleroma.Upload.Filter.Exiftool
)
defp update_filtername(%{value: value}, from_filtername, to_filtername) do
new_value =
value
|> Keyword.update(:filters, [], fn filters ->
filters
|> Enum.map(fn
^from_filtername -> to_filtername
filter -> filter
end)
end)
ConfigDB.update_or_create(%{group: :pleroma, key: Pleroma.Upload, value: new_value})
end
defp update_filtername(_, _, _), do: nil
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Aug 9, 9:34 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1724398
Default Alt Text
(3 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment