Skip to content

Commit 4f0b2a2

Browse files
regen
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
1 parent 02a440b commit 4f0b2a2

12 files changed

Lines changed: 80 additions & 202 deletions

File tree

.task/checksum/generate-ent-smart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
89fc2bb10974a78331af25af3e6356b2
1+
e05d116ed09cfadfeb4389f80f447b06
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8f91ac57f215f32a3ca106419a6acb64
1+
83b56f56a3dbe19e20431c23deef3c9b
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
750124ab9bc37d5c92fe13f7f73811cc
1+
ea6b375ad70ff3d16b671f9c17e8f609

common/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
)
2222

2323
require (
24-
ariga.io/atlas v1.2.3 // indirect
24+
ariga.io/atlas v1.3.0 // indirect
2525
entgo.io/contrib v0.7.0 // indirect
2626
github.com/99designs/gqlgen v0.17.94 // indirect
2727
github.com/XSAM/otelsql v0.43.0 // indirect

common/go.sum

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
ariga.io/atlas v1.2.3 h1:DLNK5kiz48XGv4Dbv8sJxPHncmmwUm43PoSA7UMZXEU=
2-
ariga.io/atlas v1.2.3/go.mod h1:v8ltuOKxFAU8ZF33HNfQs1iRWKuP3hJfu+dU0VE5O0Y=
1+
ariga.io/atlas v1.3.0 h1:/ZQLypoRURfNO0VJmXUNz8k6lGoeJLDPlSOZOhxG/1U=
32
entgo.io/contrib v0.7.0 h1:4Ghx8O0rqSMmca3FIJ6QyZbQAoLvdzWqLMl1MbHFEEw=
43
entgo.io/contrib v0.7.0/go.mod h1:zbPSUrbn+6dfyv8S9HWEvn1MyGpO95ik2lUNgaqWTt4=
54
entgo.io/ent v0.14.6 h1:/f2696BpwuWAEEG6PVGWflg6+Inrpq4pRWuNlWz/Skk=
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4e205f0c4e424a0b8da12cb559d7d727a0bc35b65d68075e53a57f3d23feb3ee
1+
731ac0b07df200a6df95a07df9fd59d1c05734c3dc69191f60af5100cff03d96
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d80531a7ed0cf28417e6ff4aa9944530d61071832344883fcc848617fa5a1a7c
1+
1a70fee93f4d9ad69c53cd520235448bcf4aeff77bce24678fb9544e694a45f1

internal/ent/generate/templates/ent/edge_cleanup.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ import (
4242
if err := Purge{{ $edge.Type.Name }}History(ctx, {{ $edge.Type.Name | lower }}.HasParentWith({{ $edge.Type.Name | lower }}.ID(id))); err != nil {
4343
return err
4444
}
45-
{{- end }}
4645

46+
{{- end }}
4747
if organizationCount, err := FromContext(ctx).{{ $edge.Type.Name }}.Delete().Where({{ $edge.Type.Name | lower }}.HasParentWith({{ $edge.Type.Name | lower }}.ID(id))).Exec(ctx); err != nil {
4848
logx.FromContext(ctx).Error().Err(err).Int("count", {{ $edge.Type.Name | lower }}Count).Msg("error deleting child {{ $edge.Type.Name | lower }}")
4949
return err
@@ -55,8 +55,8 @@ import (
5555
if err := Purge{{ $edge.Type.Name }}History(ctx, {{ $edge.Type.Name | lower }}.{{ $annotation.Field }}(id)); err != nil {
5656
return err
5757
}
58-
{{- end }}
5958

59+
{{- end }}
6060
if {{ $edge.Type.Name | lower }}Count, err := FromContext(ctx).{{ $edge.Type.Name }}.Delete().Where({{ $edge.Type.Name | lower }}.{{ $annotation.Field }}(id)).Exec(ctx); err != nil {
6161
logx.FromContext(ctx).Error().Err(err).Int("count", {{ $edge.Type.Name | lower }}Count).Msg("error deleting {{ $edge.Type.Name | lower }}")
6262
return err
@@ -82,8 +82,8 @@ import (
8282
if err := Purge{{ $edge.Type.Name }}History(ctx, {{ $edge.Type.Name | lower }}.Has{{ $annotation.Field }}With({{ $node.Name | lower }}.ID(id))); err != nil {
8383
return err
8484
}
85-
{{- end }}
8685

86+
{{- end }}
8787
if {{ $edge.Type.Name | lower }}Count, err := FromContext(ctx).{{ $edge.Type.Name }}.Delete().Where({{ $edge.Type.Name | lower }}.Has{{ $annotation.Field }}With({{ $node.Name | lower }}.ID(id))).Exec(ctx); err != nil {
8888
logx.FromContext(ctx).Error().Err(err).Int("count", {{ $edge.Type.Name | lower }}Count).Msg("error deleting {{ $edge.Type.Name | lower }}")
8989
return err

internal/ent/generate/templates/ent/history_cleanup.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func PurgeHistoryEnabled(ctx context.Context) bool {
3939
// the given predicates. It is a no-op unless the context opts in via contextx.WithPurgeHistory, so
4040
// deletes that should keep their audit trail are unaffected.
4141
// This has to run before the {{ $pkgName }} records themselves are deleted, the rows are matched
42-
// with a sub-select against the {{ $pkgName }} table rather than by loading the ids
42+
// with a sub-select against the {{ $pkgName }} table
4343
func Purge{{ $node.Name }}History(ctx context.Context, ps ...predicate.{{ $node.Name }}) error {
4444
if !contextx.PurgeHistoryEnabled(ctx) {
4545
return nil

internal/ent/generated/edge_cleanup.go

Lines changed: 0 additions & 121 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)