Add foreign keys in database

As most of the host set the default mysql engine to innodb I think that is a good idea to add foreign keys to the new classicpress installs


Read-only archive: https://petitions.classicpress.net/posts/71/add-foreign-keys-in-database

Author: Iulian Palade

Vote count: 6

Status: open

Tags:

  • request-add-feature

Comments

I interpreted this petition as a request to add foreign key constraints in the database schema.

With over 18 years of historically not doing things this way, this would break a lot of plugins and probably even a lot of features of core itself. It would also still be necessary to run the PHP code to delete referenced items if foreign keys are not present in the DB, which negates much of the benefit of the change.

It would be interesting to see the results of this change as an experiment run by an advanced user/developer, but I’m declining the petition as out of scope for ClassicPress itself.

This topic was automatically closed after 7 days. New replies are no longer allowed.