switch namespace to make it work with pleroma_ctl

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-10 16:10:30 +01:00
parent 59a566f6b6
commit ae03865806
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -1,10 +1,10 @@
diff --git a/lib/mix/migrator.ex b/lib/mix/migrator.ex diff --git a/lib/mix/migrator.ex b/lib/mix/migrator.ex
new file mode 100644 new file mode 100644
index 000000000..08ab8aa5d index 000000000..946c2d892
--- /dev/null --- /dev/null
+++ b/lib/mix/migrator.ex +++ b/lib/mix/migrator.ex
@@ -0,0 +1,112 @@ @@ -0,0 +1,112 @@
+defmodule Mix.Migrator do +defmodule Mix.Pleroma.Migrator do
+ import Mix.Pleroma + import Mix.Pleroma
+ alias Pleroma.Activity + alias Pleroma.Activity
+ alias Pleroma.Object + alias Pleroma.Object
@ -118,11 +118,11 @@ index 000000000..08ab8aa5d
+end +end
diff --git a/lib/mix/tasks/migrator/fix.ex b/lib/mix/tasks/migrator/fix.ex diff --git a/lib/mix/tasks/migrator/fix.ex b/lib/mix/tasks/migrator/fix.ex
new file mode 100644 new file mode 100644
index 000000000..a8b6774df index 000000000..f5070b77d
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/fix.ex +++ b/lib/mix/tasks/migrator/fix.ex
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
+defmodule Mix.Tasks.Migrator.Fix do +defmodule Mix.Tasks.Pleroma.Migrator.Fix do
+ use Mix.Task + use Mix.Task
+ alias Pleroma.Object + alias Pleroma.Object
+ alias Pleroma.Repo + alias Pleroma.Repo
@ -167,11 +167,11 @@ index 000000000..a8b6774df
+end +end
diff --git a/lib/mix/tasks/migrator/hello.ex b/lib/mix/tasks/migrator/hello.ex diff --git a/lib/mix/tasks/migrator/hello.ex b/lib/mix/tasks/migrator/hello.ex
new file mode 100644 new file mode 100644
index 000000000..e94b6db7b index 000000000..201014aaa
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/hello.ex +++ b/lib/mix/tasks/migrator/hello.ex
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
+defmodule Mix.Tasks.Migrator.Hello do +defmodule Mix.Tasks.Pleroma.Migrator.Hello do
+ use Mix.Task + use Mix.Task
+ +
+ @shortdoc "Test that Pleroma can run this task." + @shortdoc "Test that Pleroma can run this task."
@ -181,13 +181,13 @@ index 000000000..e94b6db7b
+end +end
diff --git a/lib/mix/tasks/migrator/import.ex b/lib/mix/tasks/migrator/import.ex diff --git a/lib/mix/tasks/migrator/import.ex b/lib/mix/tasks/migrator/import.ex
new file mode 100644 new file mode 100644
index 000000000..3ebd37559 index 000000000..82d7e78e4
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import.ex +++ b/lib/mix/tasks/migrator/import.ex
@@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
+defmodule Mix.Tasks.Migrator.Import do +defmodule Mix.Tasks.Pleroma.Migrator.Import do
+ use Mix.Task + use Mix.Task
+ alias Mix.Tasks.Migrator + alias Mix.Tasks.Pleroma.Migrator
+ +
+ @shortdoc "Import all dumps." + @shortdoc "Import all dumps."
+ def run(_) do + def run(_) do
@ -207,11 +207,11 @@ index 000000000..3ebd37559
+end +end
diff --git a/lib/mix/tasks/migrator/import/apps.ex b/lib/mix/tasks/migrator/import/apps.ex diff --git a/lib/mix/tasks/migrator/import/apps.ex b/lib/mix/tasks/migrator/import/apps.ex
new file mode 100644 new file mode 100644
index 000000000..2a37ec0b9 index 000000000..9ff011900
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/apps.ex +++ b/lib/mix/tasks/migrator/import/apps.ex
@@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
+defmodule Mix.Tasks.Migrator.Import.Apps do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Apps do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -244,11 +244,11 @@ index 000000000..2a37ec0b9
+end +end
diff --git a/lib/mix/tasks/migrator/import/blocks.ex b/lib/mix/tasks/migrator/import/blocks.ex diff --git a/lib/mix/tasks/migrator/import/blocks.ex b/lib/mix/tasks/migrator/import/blocks.ex
new file mode 100644 new file mode 100644
index 000000000..ac49caac8 index 000000000..9434e811b
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/blocks.ex +++ b/lib/mix/tasks/migrator/import/blocks.ex
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+defmodule Mix.Tasks.Migrator.Import.Blocks do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Blocks do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -286,11 +286,11 @@ index 000000000..ac49caac8
+end +end
diff --git a/lib/mix/tasks/migrator/import/filters.ex b/lib/mix/tasks/migrator/import/filters.ex diff --git a/lib/mix/tasks/migrator/import/filters.ex b/lib/mix/tasks/migrator/import/filters.ex
new file mode 100644 new file mode 100644
index 000000000..a07f40481 index 000000000..bb69ce2a1
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/filters.ex +++ b/lib/mix/tasks/migrator/import/filters.ex
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
+defmodule Mix.Tasks.Migrator.Import.Filters do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Filters do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -337,11 +337,11 @@ index 000000000..a07f40481
+end +end
diff --git a/lib/mix/tasks/migrator/import/follows.ex b/lib/mix/tasks/migrator/import/follows.ex diff --git a/lib/mix/tasks/migrator/import/follows.ex b/lib/mix/tasks/migrator/import/follows.ex
new file mode 100644 new file mode 100644
index 000000000..30e9b82d3 index 000000000..1b78ad450
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/follows.ex +++ b/lib/mix/tasks/migrator/import/follows.ex
@@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
+defmodule Mix.Tasks.Migrator.Import.Follows do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Follows do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -380,11 +380,11 @@ index 000000000..30e9b82d3
+end +end
diff --git a/lib/mix/tasks/migrator/import/likes.ex b/lib/mix/tasks/migrator/import/likes.ex diff --git a/lib/mix/tasks/migrator/import/likes.ex b/lib/mix/tasks/migrator/import/likes.ex
new file mode 100644 new file mode 100644
index 000000000..47bf842c2 index 000000000..f0f214431
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/likes.ex +++ b/lib/mix/tasks/migrator/import/likes.ex
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
+defmodule Mix.Tasks.Migrator.Import.Likes do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Likes do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -408,11 +408,11 @@ index 000000000..47bf842c2
+end +end
diff --git a/lib/mix/tasks/migrator/import/lists.ex b/lib/mix/tasks/migrator/import/lists.ex diff --git a/lib/mix/tasks/migrator/import/lists.ex b/lib/mix/tasks/migrator/import/lists.ex
new file mode 100644 new file mode 100644
index 000000000..61ac3c258 index 000000000..1ae01fc9e
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/lists.ex +++ b/lib/mix/tasks/migrator/import/lists.ex
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
+defmodule Mix.Tasks.Migrator.Import.Lists do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Lists do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -458,11 +458,11 @@ index 000000000..61ac3c258
+end +end
diff --git a/lib/mix/tasks/migrator/import/mutes.ex b/lib/mix/tasks/migrator/import/mutes.ex diff --git a/lib/mix/tasks/migrator/import/mutes.ex b/lib/mix/tasks/migrator/import/mutes.ex
new file mode 100644 new file mode 100644
index 000000000..5fdd6152a index 000000000..0b5fd8a07
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/mutes.ex +++ b/lib/mix/tasks/migrator/import/mutes.ex
@@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
+defmodule Mix.Tasks.Migrator.Import.Mutes do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Mutes do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -499,11 +499,11 @@ index 000000000..5fdd6152a
+end +end
diff --git a/lib/mix/tasks/migrator/import/statuses.ex b/lib/mix/tasks/migrator/import/statuses.ex diff --git a/lib/mix/tasks/migrator/import/statuses.ex b/lib/mix/tasks/migrator/import/statuses.ex
new file mode 100644 new file mode 100644
index 000000000..61be3d719 index 000000000..ed15c0aa8
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/statuses.ex +++ b/lib/mix/tasks/migrator/import/statuses.ex
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
+defmodule Mix.Tasks.Migrator.Import.Statuses do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Statuses do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -528,11 +528,11 @@ index 000000000..61be3d719
+end +end
diff --git a/lib/mix/tasks/migrator/import/thread_mutes.ex b/lib/mix/tasks/migrator/import/thread_mutes.ex diff --git a/lib/mix/tasks/migrator/import/thread_mutes.ex b/lib/mix/tasks/migrator/import/thread_mutes.ex
new file mode 100644 new file mode 100644
index 000000000..62e161c8c index 000000000..9552abda7
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/thread_mutes.ex +++ b/lib/mix/tasks/migrator/import/thread_mutes.ex
@@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
+defmodule Mix.Tasks.Migrator.Import.ThreadMutes do +defmodule Mix.Tasks.Pleroma.Migrator.Import.ThreadMutes do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -567,11 +567,11 @@ index 000000000..62e161c8c
+end +end
diff --git a/lib/mix/tasks/migrator/import/tokens.ex b/lib/mix/tasks/migrator/import/tokens.ex diff --git a/lib/mix/tasks/migrator/import/tokens.ex b/lib/mix/tasks/migrator/import/tokens.ex
new file mode 100644 new file mode 100644
index 000000000..634563fcb index 000000000..4429898ff
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/tokens.ex +++ b/lib/mix/tasks/migrator/import/tokens.ex
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+defmodule Mix.Tasks.Migrator.Import.Tokens do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Tokens do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -613,11 +613,11 @@ index 000000000..634563fcb
+end +end
diff --git a/lib/mix/tasks/migrator/import/users.ex b/lib/mix/tasks/migrator/import/users.ex diff --git a/lib/mix/tasks/migrator/import/users.ex b/lib/mix/tasks/migrator/import/users.ex
new file mode 100644 new file mode 100644
index 000000000..b97b7aae8 index 000000000..361945041
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/users.ex +++ b/lib/mix/tasks/migrator/import/users.ex
@@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
+defmodule Mix.Tasks.Migrator.Import.Users do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Users do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -661,11 +661,11 @@ index 000000000..b97b7aae8
+end +end
diff --git a/lib/mix/tasks/migrator/import/votes.ex b/lib/mix/tasks/migrator/import/votes.ex diff --git a/lib/mix/tasks/migrator/import/votes.ex b/lib/mix/tasks/migrator/import/votes.ex
new file mode 100644 new file mode 100644
index 000000000..f5a55f52a index 000000000..843b492e4
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/import/votes.ex +++ b/lib/mix/tasks/migrator/import/votes.ex
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
+defmodule Mix.Tasks.Migrator.Import.Votes do +defmodule Mix.Tasks.Pleroma.Migrator.Import.Votes do
+ use Mix.Task + use Mix.Task
+ import Mix.Pleroma + import Mix.Pleroma
+ import Mix.Migrator + import Mix.Migrator
@ -689,11 +689,11 @@ index 000000000..f5a55f52a
+end +end
diff --git a/lib/mix/tasks/migrator/rebuild.ex b/lib/mix/tasks/migrator/rebuild.ex diff --git a/lib/mix/tasks/migrator/rebuild.ex b/lib/mix/tasks/migrator/rebuild.ex
new file mode 100644 new file mode 100644
index 000000000..6aa2b45a4 index 000000000..f3894c8ae
--- /dev/null --- /dev/null
+++ b/lib/mix/tasks/migrator/rebuild.ex +++ b/lib/mix/tasks/migrator/rebuild.ex
@@ -0,0 +1,60 @@ @@ -0,0 +1,60 @@
+defmodule Mix.Tasks.Migrator.Rebuild do +defmodule Mix.Tasks.Pleroma.Migrator.Rebuild do
+ use Mix.Task + use Mix.Task
+ alias Pleroma.Object + alias Pleroma.Object
+ alias Pleroma.User + alias Pleroma.User