-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Future Dev
-
MDL-71793-add-foreign-relation-checks-to-check-database-schema
-
The intent here is to find plugins and core code which is missing out on indexes. This should potentially also be in the CI scripts for core and moodle-plugin-ci.
I'm not sure a perfect solution is possible, but we can add heuristics which looks for things which should have a foreign but don't. ie a simple heuristic could be any columns which contain 'id' such as userid or courseid.
Existing policy / guideline pages:
https://docs.moodle.org/dev/Database
https://docs.moodle.org/dev/XMLDB_Defining_one_XML_structure#Conventions
- has a non-specific relationship to
-
MDL-30799 META: Enable foreign keys in the database schema
- Open
- has been marked as being related by
-
MDL-67822 Implement a check_database_schema performance check
- Closed
- will be (partly) resolved by
-
MDL-49795 Add missing Primary/Foreign Key relationships to core Moodle tables
- Closed