function system_update_8403
Delete all cache_* tables. They are recreated on demand with the new schema.
File
-
core/
modules/ system/ system.install, line 2440
Code
function system_update_8403() {
foreach (Cache::getBins() as $bin => $cache_backend) {
// Try to delete the table regardless of which cache backend is handling it.
// This is to ensure the new schema is used if the configuration for the
// backend class is changed after the update hook runs.
$table_name = "cache_{$bin}";
$schema = Database::getConnection()->schema();
if ($schema->tableExists($table_name)) {
$schema->dropTable($table_name);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.