summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authortusooa <tusooa@kazv.moe>2022-09-04 18:43:36 +0000
committertusooa <tusooa@kazv.moe>2022-09-04 18:43:36 +0000
commit20347898e22d10f377cd35f21407555dbac53bbf (patch)
tree2e8b1afbda166dc3368152e058e5caca2df65241 /priv
parentc63cf954dea70f76beed007e11902d0a0470fc3a (diff)
parent88c1c76d3eca3412d1e02008f1b8d96fe8fe0b96 (diff)
Merge branch 'fix/federation-context-issues' into 'develop'
Fix reply context fixing (Pleroma replies to Misskey threads) and removal of context objects See merge request pleroma/pleroma!3717
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs18
1 files changed, 18 insertions, 0 deletions
diff --git a/priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs b/priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs
new file mode 100644
index 000000000..84365dbe3
--- /dev/null
+++ b/priv/repo/migrations/20220807125023_data_migration_delete_context_objects.exs
@@ -0,0 +1,18 @@
+defmodule Pleroma.Repo.Migrations.DataMigrationDeleteContextObjects do
+ use Ecto.Migration
+
+ require Logger
+
+ def up do
+ dt = NaiveDateTime.utc_now()
+
+ execute(
+ "INSERT INTO data_migrations(name, inserted_at, updated_at) " <>
+ "VALUES ('delete_context_objects', '#{dt}', '#{dt}') ON CONFLICT DO NOTHING;"
+ )
+ end
+
+ def down do
+ execute("DELETE FROM data_migrations WHERE name = 'delete_context_objects';")
+ end
+end