Commit 77ee90a8 authored by DamienMcKenna's avatar DamienMcKenna Committed by develCuy

Issue #1916532: hook_schema() is needed.

parent 6b2b1ec2
......@@ -6,9 +6,9 @@
*/
/**
* Implements hook_update_N().
* Implements hook_schema().
*/
function menu_token_update_7000(&$sandbox) {
function menu_token_schema() {
$schema['menu_token'] = array(
'description' => t('Menu token properties'),
'fields' => array (
......@@ -30,7 +30,37 @@ function menu_token_update_7000(&$sandbox) {
'primary key' => array('mlid'),
);
db_create_table('menu_token', $schema['menu_token']);
return $schema;
}
/**
* Implements hook_update_N().
*/
function menu_token_update_7000(&$sandbox) {
if (!db_table_exists('menu_token')) {
$schema['menu_token'] = array(
'description' => t('Menu token properties'),
'fields' => array (
'mlid' => array (
'description' => t('The menu link {menu_links}.mlid'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'link_path' => array (
'description' => t('The actual path with tokens'),
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array('mlid'),
);
db_create_table('menu_token', $schema['menu_token']);
}
}
/**
......
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