You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When automatically deleting from network_switches_ports, I get an error:
[critical] Error thrown while running command "doctrine:fixtures:load". Message: "An exception occurred while executing a query: SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table "network_switches_ports" violates foreign key constraint "fk_47b01a1e7449a980" on table "hardware_ip_cameras"
DETAIL: Key (id)=(1ece1947-037b-6c14-90d9-8784702a4f98) is still referenced from table "hardware_ip_cameras"."
FK from hardware_ip_cameras.
If you delete in the correct order, then such an error would not have occurred.
Correct order of deleting from tables: hardware_ip_cameras, hardware_video_servers, network_switches_ports, hardware_network_switches, hardware.
The text was updated successfully, but these errors were encountered:
There are no other way to disable the FK constraint in doctrine:fixtures:load command when you want to refresh the database, so have to use this way instead:
Depending on you database, you could try the truncate flag. However, if it causes an implicit flush for the transaction, you will be out of luck with that method on PHP 8.
There is such an tables architecture:
Execute
app:fixtures:load
with purge.When automatically deleting from network_switches_ports, I get an error:
FK from
hardware_ip_cameras
.If you delete in the correct order, then such an error would not have occurred.
Correct order of deleting from tables:
hardware_ip_cameras
,hardware_video_servers
,network_switches_ports
,hardware_network_switches
,hardware
.The text was updated successfully, but these errors were encountered: