1 system.install | system_update_1064() |
Add langcode column to {menu_links} table.
Related topics
File
- core/
modules/ system/ system.install, line 3169 - Install, update and uninstall functions for the system module.
Code
function system_update_1064() {
if (!db_field_exists('menu_links', 'langcode')) {
$spec = array(
'description' => 'The language code for this menu link; if \'und\', the link will be shown in all languages.',
'type' => 'varchar',
'length' => 12,
'not null' => TRUE,
'default' => '',
);
db_add_field('menu_links', 'langcode', $spec);
db_query("UPDATE {menu_links} SET langcode = 'und'");
}
}