-
Sub-task
-
Resolution: Fixed
-
Minor
-
2.0
-
None
-
Any
-
MOODLE_20_STABLE
-
MOODLE_20_STABLE
-
Moderate
As explained in http://moodle.org/mod/forum/discuss.php?d=127196 current behaviour when trying to perform field ddl actions (drop field, rename, change some property...) is really not cross-db at all, with each DB following different approaches.
So, in order to get a consistent approach for any DB we are going to:
1) Create one new ddl_dependency_exception (extends ddl_change_structure_exception)
2) In dbmanager, perform the required dependency checks (mainly look for existing indexes for now) and throw that exception if dependency is found.
3) In XMLDB editor, when generating PHP code to be used in upgrade scripts, look for the XMLDB definition (not to DB!) and if there is any dependency, include php code to drop/create indexes.
- will be (partly) resolved by
-
MDL-19701 In PHP code generation, detect field dependencies (XMLDB-based) and provide needed code
-
- Closed
-