551 B · text History 6280797
defmodule GitGud.Repositories.RepositoryRoot do
@moduledoc """
One parentless commit of a repository.
Recorded so fork lineage can be found by shared history rather than by
the `parent_repository_id` link, which imports never set and which a
detach can clear. See `GitGud.Repositories.list_related_repositories/2`.
"""
use Ecto.Schema
alias GitGud.Repositories.Repository
schema "repository_roots" do
field :sha, :binary
belongs_to :repository, Repository
timestamps(type: :utc_datetime, updated_at: false)
end
end