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

Foreign key deadlock with customer.billing_address_id #7063

Open
gempain opened this issue Apr 12, 2024 · 7 comments
Open

Foreign key deadlock with customer.billing_address_id #7063

gempain opened this issue Apr 12, 2024 · 7 comments
Labels
status: wontfix This will not be worked on

Comments

@gempain
Copy link
Contributor

gempain commented Apr 12, 2024

Bug report

Describe the bug

Field billing_address_id in table customer is not referenced in the Customer model. Also, it has a foreign key FK_8abe81b9aac151ae60bf507ad15 on address.id which creates a dealock with foreign key FK_9c9614b2f9d01665800ea8dbff7 from address.customer_id which points to customer.id.

System information

Medusa version (including plugins): "@medusajs/medusa": "1.20.2",

Steps to reproduce the behavior

Expected behavior

Column billing_address_id should either be dropped, or referenced in the Customer model.

Screenshots

Code snippets

Additional context

@olivermrbl
Copy link
Contributor

olivermrbl commented Apr 15, 2024

We could remove the billing_address_id from the customer table and introduce a flag on the address to indicate whether or not it is the customer's default billing address. This has been done for the customer model in version 2.0.

For 1.*, this requires a few changes. We likely won't fix it in the near term. If this is proving to be a huge pain for you, you are more than welcome to send a PR for it.

@gempain
Copy link
Contributor Author

gempain commented Apr 15, 2024

Not a pain for me, just wanted to raise the point. Wait, there's a 2.0 coming out ? When's that happening ?

@gempain
Copy link
Contributor Author

gempain commented Apr 15, 2024

Aw, okay found this. Btw @olivermrbl I PMed you on X ;)

@olivermrbl
Copy link
Contributor

Aw, okay found this. Btw @olivermrbl I PMed you on X ;)

Must have missed this, will check it!

@olivermrbl
Copy link
Contributor

Wait, there's a 2.0 coming out ? When's that happening ?

Release candidate is expected in ~1 month.

@gempain
Copy link
Contributor Author

gempain commented Apr 15, 2024

Wait, there's a 2.0 coming out ? When's that happening ?

Release candidate is expected in ~1 month.

Can't wait !

@olivermrbl
Copy link
Contributor

Given our upcoming 2.0 release, I will label this as a wont-fix. I'll gladly reopen the issue if something is experiencing issues with this.

@olivermrbl olivermrbl added status: wontfix This will not be worked on and removed type: bug labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants