MDL-19695 field dependencies - defined new exception ddl_dependency_exception that

will be thrown when one DDL operation (drop only for now) is attempted over one
field being part of indexes.
This commit is contained in:
stronk7
2009-07-02 16:08:44 +00:00
parent 4276a19a78
commit 2baf1380d4
3 changed files with 73 additions and 24 deletions
+17
View File
@@ -130,3 +130,20 @@ class ddl_change_structure_exception extends ddl_exception {
parent::__construct('ddlexecuteerror', NULL, $errorinfo);
}
}
/**
* Error changing db structure, caused by some depency found
* like trying to modify one field having related indexes.
*/
class ddl_dependency_exception extends ddl_exception {
function __construct($targettype, $targetname, $offendingtype, $offendingname, $debuginfo=null) {
$a = new object();
$a->targettype = $targettype;
$a->targetname = $targetname;
$a->offendingtype = $offendingtype;
$a->offendingname = $offendingname;
parent::__construct('ddldependencyerror', $a, $debuginfo);
}
}