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

  def change do
    alter table(:contacts) do
      add :private, :boolean, null: false, default: false
    end

    create index(:contacts, [:user_id],
             where: "private = true",
             name: :contacts_private_user_id_idx
           )
  end
end
