Skip to content
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

Add subsciption and subscription_item to line_item PK #28

Merged
merged 1 commit into from
May 24, 2019

Conversation

dmosorast
Copy link
Contributor

As has been the case with the moving target of a unique identifier that describes a line_item on an invoice, it appears there are cases where two line items can share the same id, invoice, and subscription, but differ in their subscription_item value.

Rather than trying to construct an artificial unique primary key, this PR adds to the scope of what identifies a unique record by including subscription and subscription_item, if present. If these are not present, then it is assumed that the other keys define it as a unique record, and the missing properties are added to the record as null to pass validation.

@nick-mccoy nick-mccoy merged commit 0d16f4e into master May 24, 2019
dmosorast added a commit that referenced this pull request Jun 13, 2019
@luandy64 luandy64 deleted the fix/invoice_line_items_pk branch April 3, 2020 17:05
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