logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

20220807125023_data_migration_delete_context_objects.exs (446B)


  1. defmodule Pleroma.Repo.Migrations.DataMigrationDeleteContextObjects do
  2. use Ecto.Migration
  3. require Logger
  4. def up do
  5. dt = NaiveDateTime.utc_now()
  6. execute(
  7. "INSERT INTO data_migrations(name, inserted_at, updated_at) " <>
  8. "VALUES ('delete_context_objects', '#{dt}', '#{dt}') ON CONFLICT DO NOTHING;"
  9. )
  10. end
  11. def down do
  12. execute("DELETE FROM data_migrations WHERE name = 'delete_context_objects';")
  13. end
  14. end