function memcache_uninstall in Memcache API and Integration 5.2
Same name and namespace in other branches
- 5 memcache.install \memcache_uninstall()
Remove serialized field from cache tables
File
- ./
memcache.install, line 39
Code
function memcache_uninstall() {
switch ($GLOBALS['db_type']) {
case 'pgsql':
//db_add_column($ret, 'cache', 'serialized', 'int(1)', array('default' => "'0'", 'not null' => TRUE));
//db_add_column($ret, 'cache_filter', 'serialized', 'int(1)', array('default' => "'0'", 'not null' => TRUE));
//db_add_column($ret, 'cache_page', 'serialized', 'int(1)', array('default' => "'0'", 'not null' => TRUE));
//db_add_column($ret, 'cache_menu', 'serialized', 'int(1)', array('default' => "'0'", 'not null' => TRUE));
break;
case 'mysql':
case 'mysqli':
db_query("ALTER TABLE {cache} DROP serialized");
db_query("ALTER TABLE {cache_filter} DROP serialized");
db_query("ALTER TABLE {cache_page} DROP serialized");
db_query("ALTER TABLE {cache_menu} DROP serialized");
if (db_table_exists('cache_views')) {
db_query("ALTER TABLE {cache_views} DROP serialized");
}
if (db_table_exists('cache_blocks')) {
db_query("ALTER TABLE {cache_blocks} DROP serialized");
}
if (db_table_exists('cache_content')) {
db_query("ALTER TABLE {cache_content} DROP serialized");
}
if (db_table_exists('cache_reptag')) {
db_query("ALTER TABLE {cache_reptag} DROP serialized");
}
break;
}
}