You are here

function view_mode_page_module_schema in View Mode Page 7.2

Same name and namespace in other branches
  1. 8 view_mode_page.install \view_mode_page_module_schema()
  2. 8.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

4 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
view_mode_page_update_7102 in ./view_mode_page.install
Add entity_type field to the primary key

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',
      'entity_type',
      'view_mode',
      'url_pattern',
    ),
    'index' => array(
      'entity_type' => array(
        'entity_type',
      ),
    ),
  );
  return $schema;
}