Skip to content

Unique constraint for a repository snapshot #402

Open
@behnazh-w

Description

@behnazh-w

We need to add a unique constraint for the Repository SQLAlchemy mapped objects to avoid keeping duplicate entries. A candidate constraint can be complete_name + commit.

As the unique constraint is added, we need to check if a repository entry exists in the DB before adding. That might require refactoring the repo finder and repository preparation (cloning , etc.) because if a repository entry does not exist in the DB, we obtain the commit sha and branch values after cloning. If the commit sha is known and exists in the DB, we will still need to prepare the repository, but we do not need to add a new entry to the DB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseThe issues related to the database

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions