pleroma/priv/repo/migrations/20240403000000_data_migration_update_relay_actor_type.exs
marcin mikołajczak b189a49d65 Add DataMigration for relay actor type
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-04 18:24:19 +01:00

21 lines
589 B
Elixir

# Pleroma: A lightweight social networking server
# Copyright © 2017-2024 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Repo.Migrations.DataMigrationUpdateRelayActorType do
use Ecto.Migration
def up do
dt = NaiveDateTime.utc_now()
execute(
"INSERT INTO data_migrations(name, inserted_at, updated_at) " <>
"VALUES ('update_relay_actor_type', '#{dt}', '#{dt}') ON CONFLICT DO NOTHING;"
)
end
def down do
execute("DELETE FROM data_migrations WHERE name = 'update_relay_actor_type';")
end
end