defmodule Microwaveprop.Repo.Migrations.AddFlaggedByUserToContacts do
  use Ecto.Migration

  def change do
    alter table(:contacts) do
      add :flagged_by_user_id, references(:users, type: :binary_id, on_delete: :nilify_all)
      add :flagged_at, :utc_datetime
    end

    create index(:contacts, [:flagged_by_user_id])
  end
end
