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

  def change do
    alter table(:api_tokens) do
      add :user_id, references(:users, type: :binary_id, on_delete: :delete_all)
    end

    create index(:api_tokens, [:user_id])
  end
end
