defmodule Towerops.Repo.Migrations.AddAlertPreferencesToMobileSessions do
  use Ecto.Migration

  def change do
    alter table(:mobile_sessions) do
      add :alerts_enabled, :boolean, default: true, null: false
      add :push_token, :text
      add :push_platform, :string
    end

    create index(:mobile_sessions, [:user_id, :alerts_enabled])
  end
end
