You are here

function we_megamenu_schema in Drupal Mega Menu 8

Same name and namespace in other branches
  1. 8.x we_megamenu.install \we_megamenu_schema()

Implements hook_schema().

File

./we_megamenu.install, line 11
Create table we_megamenu().

Code

function we_megamenu_schema() {
  $schema['we_megamenu'] = [
    'fields' => [
      'menu_name' => [
        'type' => 'varchar',
        'length' => 150,
        'not null' => TRUE,
      ],
      'theme' => [
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
      ],
      'data_config' => [
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
      ],
    ],
    'primary key' => [
      'menu_name',
      'theme',
    ],
  ];
  return $schema;
}