doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.78k stars 224 forks source link

Disable foreign key checks on purge for all mysql versions #407

Open croensch opened 2 years ago

croensch commented 2 years ago

For your consideration, see #272. I don't know if the discussion was a yes/no to this feature.

I can push a little refactor of getTruncateTableSQL() to make it fit better.

croensch commented 2 years ago

I initially picked up and rebased this PR to revive or end the discussion around this problem. Now that i looked into it, i understand a few things better:

So would you mind if i rewrite it to address all this? In the same PR?

greg0ire commented 2 years ago

DBAL 3.3, but 3.0 is the minimum dependency.

I think it's fine to bump the minimum dependency to 3.3, sniffing the ~connection~ driver (why did you mention the connection?) is not a great idea because of middlewares that can wrap the driver in an arbitrary number of decorators.

So would you mind if i rewrite it to address all this? In the same PR?

Sure, go ahead :slightly_smiling_face:

croensch commented 2 years ago

Sorry for the spam. I got nothing to add or change - it's finished for me.

Regarding the DBAL (Common?) dependency i also check the previous class in a few easy-to-delete lines. Just in case you want to postpone upping the dependency.

greg0ire commented 2 years ago

Reviewers: to be squash-merged

croensch commented 12 months ago

@SenseException @derrabus can we get another look at this?