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

  def change do
    alter table(:users) do
      add :default_organization_id,
          references(:organizations, type: :binary_id, on_delete: :nilify_all)
    end

    create index(:users, [:default_organization_id])
  end
end
