X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fincludes%2Fschema.inc;fp=web%2Fcore%2Fincludes%2Fschema.inc;h=978ec2307af5c038e8a7368672764d0fe2c88e48;hp=443cbf1934d035b45262ccd540624b9f4a1df038;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/includes/schema.inc b/web/core/includes/schema.inc index 443cbf193..978ec2307 100644 --- a/web/core/includes/schema.inc +++ b/web/core/includes/schema.inc @@ -130,12 +130,12 @@ function drupal_install_schema($module) { * The module for which the tables will be removed. */ function drupal_uninstall_schema($module) { - $schema = drupal_get_module_schema($module); - _drupal_schema_initialize($schema, $module, FALSE); - - foreach ($schema as $table) { - if (db_table_exists($table['name'])) { - db_drop_table($table['name']); + $tables = drupal_get_module_schema($module); + _drupal_schema_initialize($tables, $module, FALSE); + $schema = \Drupal::database()->schema(); + foreach ($tables as $table) { + if ($schema->tableExists($table['name'])) { + $schema->dropTable($table['name']); } } } @@ -202,7 +202,7 @@ function _drupal_schema_initialize(&$schema, $module, $remove_descriptions = TRU } /** - * Typecasts values to proper datatypes. + * Typecasts values to proper data types. * * MySQL PDO silently casts, e.g. FALSE and '' to 0, when inserting the value * into an integer column, but PostgreSQL PDO does not. Look up the schema