GithubHelp home page GithubHelp logo

Comments (5)

vincent-peugnet avatar vincent-peugnet commented on July 19, 2024

This is what I got when trying to delete an userClass:

An exception occurred while executing 'DELETE FROM user_class WHERE id = ?' with params [12]:

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`antilope`.`sharable`, CONSTRAINT `FK_83471A9C57EEBAA5` FOREIGN KEY (`visible_by_id`) REFERENCES `user_class` (`id`))

from antilope.

vincent-peugnet avatar vincent-peugnet commented on July 19, 2024

Sounds like it's working !!! But is it normal that you did not generate any migrations? even after you've removed 'delete' cascade option from doctrine ??? @n-peugnet

When I make doctrine:migration:diff doctrine tell me that:

No changes detected in your mapping information.

So I imagine it's good ??

from antilope.

n-peugnet avatar n-peugnet commented on July 19, 2024

As we read from Doctrine doc, this option was the doctrine one, which emulate at doctrine level the feature of ON DELETE 'cascade' from SQL, which I kept.
It was only another software layer hover the database, so no migration needed.

from antilope.

vincent-peugnet avatar vincent-peugnet commented on July 19, 2024

Conclusion is : OH YEAH BABY

from antilope.

n-peugnet avatar n-peugnet commented on July 19, 2024

Good job on the rest of the deletion job, like the users moving and the warnings BTW!

from antilope.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.