461 B · text History 4b6fe3b
defmodule OhMyExOhIrcd.Repo.Migrations.CreateImageRequestLogs do
  use Ecto.Migration

  def change do
    create table(:image_request_logs) do
      add :channel_id, references(:channels, on_delete: :delete_all), null: false
      add :who, :string
      add :status, :string, null: false
      add :detail, :string

      timestamps(type: :utc_datetime, updated_at: false)
    end

    create index(:image_request_logs, [:channel_id, :inserted_at])
  end
end