1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-23 17:55:07 +01:00
pleroma/priv/repo/migrations/20190716100804_add_expirations_table.exs
Mike Verdone 666514194a Add activity expirations table
Add a table to store activity expirations. An activity can have zero or
one expirations. The expiration has a scheduled_at field which stores
the time at which the activity should expire and be deleted.
2019-07-24 13:14:52 +02:00

11 lines
311 B
Elixir

defmodule Pleroma.Repo.Migrations.AddExpirationsTable do
use Ecto.Migration
def change do
create_if_not_exists table(:activity_expirations) do
add(:activity_id, references(:activities, type: :uuid, on_delete: :delete_all))
add(:scheduled_at, :naive_datetime, null: false)
end
end
end