Commit ad6f9ba7 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#190899 by bjaspan: (regression) return the queries performed in...

#190899 by bjaspan: (regression) return the queries performed in drupal_install_schema() and drupal_uninstall_schema(), so module install hooks can report on creation of tables, or failures, as it was in Drupal 5
parent 9c6e8863
......@@ -3087,6 +3087,10 @@ function drupal_get_schema($name = NULL, $rebuild = FALSE) {
*
* @param $module
* The module for which the tables will be created.
* @return
* An array of arrays with the following key/value pairs:
* success: a boolean indicating whether the query succeeded
* query: the SQL query(s) executed, passed through check_plain()
*/
function drupal_install_schema($module) {
$schema = drupal_get_schema_unprocessed($module);
......@@ -3096,6 +3100,7 @@ function drupal_install_schema($module) {
foreach ($schema as $name => $table) {
db_create_table($ret, $name, $table);
}
return $ret;
}
/**
......@@ -3107,6 +3112,10 @@ function drupal_install_schema($module) {
*
* @param $module
* The module for which the tables will be removed.
* @return
* An array of arrays with the following key/value pairs:
* success: a boolean indicating whether the query succeeded
* query: the SQL query(s) executed, passed through check_plain()
*/
function drupal_uninstall_schema($module) {
$schema = drupal_get_schema_unprocessed($module);
......@@ -3116,6 +3125,7 @@ function drupal_uninstall_schema($module) {
foreach ($schema as $table) {
db_drop_table($ret, $table['name']);
}
return $ret;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment