Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Drop index "workflowrun_state_created_at" from table: "workflow_runs"
DROP INDEX "workflowrun_state_created_at";
-- Create index "workflowrun_state_created_at" to table: "workflow_runs"
CREATE INDEX "workflowrun_state_created_at" ON "workflow_runs" ("state", "created_at");
3 changes: 2 additions & 1 deletion app/controlplane/pkg/data/ent/migrate/migrations/atlas.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h1:aDLoUdZ7A/XcJmyQg4Qia82eQ6BN67RfTrTVh+uZoHo=
h1:aS9Wt24wE8L/70Zd57Ib333ZYfk2lIqY5uK+oPHK9uo=
20230706165452_init-schema.sql h1:VvqbNFEQnCvUVyj2iDYVQQxDM0+sSXqocpt/5H64k8M=
20230710111950-cas-backend.sql h1:A8iBuSzZIEbdsv9ipBtscZQuaBp3V5/VMw7eZH6GX+g=
20230712094107-cas-backends-workflow-runs.sql h1:a5rzxpVGyd56nLRSsKrmCFc9sebg65RWzLghKHh5xvI=
Expand Down Expand Up @@ -112,3 +112,4 @@ h1:aDLoUdZ7A/XcJmyQg4Qia82eQ6BN67RfTrTVh+uZoHo=
20250820171503.sql h1:SsLD5Tf6woeFE7/FLI9XVQpnEgx4CJ9d7fWwNOZvOrA=
20250827093032.sql h1:K+XDWewSLoGBM+zjkBMag3mMQFFQyoQ9SePzfRxC694=
20250902095134.sql h1:e1DP8uYf/CX7RCiCF+E2/TKXiFUR6EUQBPy0wh5Xxl0=
20250908160222.sql h1:TW3tF9qlZMuhni19fWIwE6M74SBec5uHoflcHE/X77w=
5 changes: 0 additions & 5 deletions app/controlplane/pkg/data/ent/migrate/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,11 +813,6 @@ var (
Name: "workflowrun_state_created_at",
Unique: false,
Columns: []*schema.Column{WorkflowRunsColumns[3], WorkflowRunsColumns[1]},
Annotation: &entsql.IndexAnnotation{
DescColumns: map[string]bool{
WorkflowRunsColumns[1].Name: true,
},
},
},
{
Name: "workflowrun_state_finished_at",
Expand Down
2 changes: 1 addition & 1 deletion app/controlplane/pkg/data/ent/schema/workflowrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (WorkflowRun) Indexes() []ent.Index {
index.Fields("workflow_id", "created_at").Annotations(entsql.DescColumns("created_at")),
index.Fields("workflow_id", "state", "created_at").Annotations(entsql.DescColumns("created_at")),
// Expiration job
index.Fields("state", "created_at").Annotations(entsql.DescColumns("created_at")),
index.Fields("state", "created_at"),
// search and order by finish date
index.Fields("state", "finished_at"),
// Referrer
Expand Down
Loading