You are here

function view_mode_page_module_schema in View Mode Page 8.2

Same name and namespace in other branches
  1. 8 view_mode_page.install \view_mode_page_module_schema()
  2. 7.2 view_mode_page.install \view_mode_page_module_schema()
  3. 7 view_mode_page.install \view_mode_page_module_schema()

Just return the current schema

Return value

array Schema array

3 calls to view_mode_page_module_schema()
view_mode_page_schema in ./view_mode_page.install
Implements hook_schema().
view_mode_page_update_7100 in ./view_mode_page.install
Add title and show title fields.
view_mode_page_update_7101 in ./view_mode_page.install
Add the entity_type field

File

./view_mode_page.install, line 11
Install the DB table for the View Mode Page module

Code

function view_mode_page_module_schema() {
  $schema = array();
  $schema['view_mode_page'] = array(
    'fields' => array(
      'content_type' => array(
        'type' => 'varchar',
        'length' => 55,
        'not null' => TRUE,
        'description' => 'The bundle for this entity',
      ),
      'view_mode' => array(
        'type' => 'varchar',
        'length' => 55,
        'not null' => TRUE,
      ),
      'url_pattern' => array(
        'type' => 'varchar',
        'length' => 200,
        'not null' => TRUE,
      ),
      'entity_type' => array(
        'type' => 'varchar',
        'length' => 55,
        'not null' => TRUE,
        'default' => 'node',
        'description' => 'The entity type for this node',
      ),
      'show_title' => array(
        'type' => 'int',
        'default' => 0,
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'content_type',
      'view_mode',
      'url_pattern',
    ),
    'index' => array(
      'entity_type' => array(
        'entity_type',
      ),
    ),
  );
  return $schema;
}