You are here

function ajaxblocks_schema in Ajax Blocks 6

Same name and namespace in other branches
  1. 7 ajaxblocks.install \ajaxblocks_schema()

Implements hook_schema().

File

./ajaxblocks.install, line 11
Install, update and uninstall functions for the ajaxblocks module.

Code

function ajaxblocks_schema() {
  $schema = array();
  $schema['ajaxblocks'] = array(
    'description' => 'Stores AJAX settings for blocks.',
    'fields' => array(
      'block_id' => array(
        'description' => 'The primary identifier for a block.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'is_ajax' => array(
        'description' => 'Boolean indicating whether the block is to be loaded via AJAX.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'loader_picture' => array(
        'description' => 'Loader picture index (0 - none).',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'is_late' => array(
        'description' => 'Boolean indicating whether to use window.onload event.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'delay' => array(
        'description' => 'Time to wait before block loading.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'include_noscript' => array(
        'description' => 'Boolean indicating whether to include noscript tag.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
      ),
      'cached_roles' => array(
        'description' => 'Roles for which the block is loaded via AJAX for cached pages.',
        'type' => 'varchar',
        'length' => 1000,
        'default' => '1',
      ),
      'uncached_roles' => array(
        'description' => 'Roles for which the block is loaded via AJAX for uncached pages.',
        'type' => 'varchar',
        'length' => 1000,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'block_id',
    ),
  );
  return $schema;
}