feat(credit): add delete of credit transactions by billing account - #1842
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rohilsurana
left a comment
There was a problem hiding this comment.
One inline note on the doc comment. Also, the PR description says credit transactions hold a foreign key to the billing customer row. billing_transactions.account_id has no REFERENCES constraint (see 20231012175641_create_billing_tables.up.sql). The delete is still worth having, since it avoids orphaned rows, but the description overstates the constraint. Worth updating so reviewers do not take the FK claim at face value.
Credit transactions hold a foreign key to the billing customer row. Without a way to remove them, a billing account teardown would leave them orphaned or fail on the constraint. The method is meant for account teardown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
af60d6b to
8ac4120
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Coverage Report for CI Build 30970356124Coverage decreased (-0.02%) to 47.509%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions71 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
Part of #1835. Stacked on the checkout delete PR.
Credit transactions also hold a foreign key to the billing customer row. Without a delete method, an account teardown would either orphan them or fail on the constraint.
Changes
DeleteByAccountIDon the transactions Postgres repository.DeleteByAccountIDon the credit service.No behavior change: nothing calls these yet.
🤖 Generated with Claude Code