Fill in the missing "key_exists()" method in ddl.php
Bug #1255378 reported by
Aaron Wells
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Aaron Wells | ||
1.8 |
Fix Released
|
Medium
|
Unassigned | ||
1.9 |
Fix Released
|
Medium
|
Aaron Wells |
Bug Description
For bug 1081947 we want to check whether some keys exist on certain tables in the database. We have an "index_exists" and "find_index_name" function in ddl.php to check for whether indexes exist, but just some TODO's in the corresponding "find_key_name" method.
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Here's the test file I used to test whether the script worked properly for some existing Mahara primary keys, foreign keys, and unique keys. Although the XMLDB library also defines an XMLDB_KEY_ FOREIGN_ UNIQUE type, there aren't actually any keys of that type in Mahara, so I left that test out.
Hm, and actually, the keys in my test script are ones that were added for https:/ /bugs.launchpad .net/mahara/ +bug/1081947 . So you'll have to install patch https:/ /reviews. mahara. org/#/c/ 2744/ before the test will all work correctly.