# `Lightning.VersionControl.ProjectRepoConnection`
[🔗](https://github.com/OpenFn/lightning/blob/main/lib/lightning/version_control/project_repo_connection.ex#L1)

Ecto model for project repo connections

# `t`

```elixir
@type t() :: %Lightning.VersionControl.ProjectRepoConnection{
  __meta__: Ecto.Schema.Metadata.t(),
  accept: term(),
  access_token: term(),
  branch: String.t() | nil,
  config_path: term(),
  github_installation_id: String.t() | nil,
  id: Ecto.UUID.t() | nil,
  inserted_at: term(),
  local_alias: term(),
  project: nil | Lightning.Projects.Project.t() | Ecto.Association.NotLoaded,
  project_id: term(),
  repo: String.t() | nil,
  root_project_id: Ecto.UUID.t() | nil,
  sync_direction: term(),
  sync_version: term(),
  updated_at: term(),
  workspace_path: term()
}
```

# `changeset`

# `config_path`

# `configure_changeset`

# `create_changeset`

# `reconfigure_changeset`

# `tree_branch_conflict?`

```elixir
@spec tree_branch_conflict?(
  Ecto.UUID.t(),
  String.t(),
  String.t(),
  Ecto.UUID.t() | nil
) :: boolean()
```

Returns `true` when any other connection already binds the given
`(repo, branch)` to the same project tree (identified by `root_project_id`).
Excludes the row identified by `self_id` so that updates to an existing
connection don't conflict with themselves.

# `tree_unique_violation?`

```elixir
@spec tree_unique_violation?(Ecto.Changeset.t()) :: boolean()
```

True if the given changeset's insert/update failed on the tree-uniqueness
index. Used to translate a constraint violation back into the
`:branch_used_in_project_tree` atom error at the boundary.

# `workspace_file`

A file inside the CLI workspace (v2), relative to the repo root

# `workspace_path`

The CLI workspace (v2), relative to the repo root

---

*Consult [api-reference.md](api-reference.md) for complete listing*
