Skip to content

chore: add index workflowName,project #1388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

migmartri
Copy link
Member

We are starting to do queries based on name + project already

Ref #1375

@migmartri migmartri requested review from jiparis and javirln October 11, 2024 07:55
@@ -70,6 +70,10 @@ func (Workflow) Edges() []ent.Edge {

func (Workflow) Indexes() []ent.Index {
return []ent.Index{
index.Fields("name", "project").Edges("organization").Unique().Annotations(
entsql.IndexWhere("deleted_at IS NULL"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this!

Copy link
Member

@javirln javirln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@migmartri migmartri merged commit fdaf6d5 into chainloop-dev:main Oct 11, 2024
13 checks passed
@migmartri migmartri deleted the 375-add-index branch October 11, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants