move to 2.5.5
[anni] / priv / repo / migrations / 20220807125023_data_migration_delete_context_objects.exs
1 defmodule Pleroma.Repo.Migrations.DataMigrationDeleteContextObjects do
2   use Ecto.Migration
3
4   require Logger
5
6   def up do
7     dt = NaiveDateTime.utc_now()
8
9     execute(
10       "INSERT INTO data_migrations(name, inserted_at, updated_at) " <>
11         "VALUES ('delete_context_objects', '#{dt}', '#{dt}') ON CONFLICT DO NOTHING;"
12     )
13   end
14
15   def down do
16     execute("DELETE FROM data_migrations WHERE name = 'delete_context_objects';")
17   end
18 end