migrations icon indicating copy to clipboard operation
migrations copied to clipboard

Dependent SQL queries executed in wrong order

Open Creeperface01 opened this issue 4 years ago • 0 comments

Bug Report

I switched from join table to common Entity class but migration failed on query adding a constraint for foreign key of my new joining entity before altering it. That resulted in non-existent foreign key.

Q A
BC Break no
Version 3.1.1

Current behavior

Migration fails.

On the line 3 there's a key referencing id of table app_product_option_product_value which is being altered on line 9 https://paste.ubuntu.com/p/6RnMCmGqKW/

How to reproduce

Not sure, probably described my case in issue description, anyway could do a deeper research if needed.

Expected behavior

Migration should order SQL queries to avoid conflicts. So first the class should be altered and then foreign keys referencing its columns could be added.

Creeperface01 avatar Jul 16 '21 11:07 Creeperface01