t('Stores block\'s info and callbacks defined by enabled modules.'), 'fields' => array( 'bid' => array( 'description' => t('Primary Key: the block unique identifier'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'module' => array( 'type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '', 'description' => t("The module from which the block originates; for example, 'user' for the Who's Online block, and 'block' for any custom blocks."), ), 'name' => array( 'description' => t('The human readable name of the block, as shown to the user in the block admin pages.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'description' => array( 'description' => t('Provide a more descriptive information about the block.'), 'type' => 'text', 'not null' => TRUE, 'default' => '', ), 'custom' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny', 'description' => t('Flag to indicate how users may control visibility of the block. (0 = Users cannot control, 1 = On by default, but can be hidden, 2 = Hidden by default, but can be shown)'), ), 'visibility' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny', 'description' => t('Flag to indicate how to show blocks on pages. (0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility)'), ), 'pages' => array( 'type' => 'text', 'not null' => TRUE, 'description' => t('Contents of the "Pages" block; contains either a list of paths on which to include/exclude the block or PHP code, depending on "visibility" setting.'), ), 'cache' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny', 'description' => t('Binary flag to indicate block cache mode. (-1: Do not cache, 1: Cache per role, 2: Cache per user, 4: Cache per page, 8: Block cache global) See BLOCK_CACHE_* constants in block.module for more detailed information.'), ), 'title' => array( 'type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '', 'description' => t('Title for the block. It can be altered by other modules or modified in the block admin pages(Empty string will use block default title, will remove the title, text will cause block to use specified title.)'), ), 'title_callback' => array( 'description' => t('A function which will alter the title. Defaults to t()'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'title_arguments' => array( 'description' => t('A serialized array of arguments for the title callback. If empty, the title will be used as the sole argument for the title callback.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'block_callback' => array( 'description' => t('Name of a function used to render the block on the system administration page for this item.'), 'type' => 'varchar', 'length' => 255, 'not null' => FALSE, 'default' => '', ), 'block_arguments' => array( 'description' => t('A serialized array of arguments for the block callback.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'access_callback' => array( 'description' => t('The callback which determines the access to this block. Defaults to user_access.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'access_arguments' => array( 'description' => t('A serialized array of arguments for the access callback.'), 'type' => 'text', 'not null' => FALSE, ), ), 'primary key' => array('bid'), 'unique keys' => array( 'name' => array('name'), ), ); $schema['blocks_regions'] = array( 'description' => t('Maps blocks to themes and regions.'), 'fields' => array( 'bid' => array( 'description' => t('Primary Key: the block unique identifier.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'theme' => array( 'type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '', 'description' => t('The theme name under which the block is active.'), ), 'region' => array( 'type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '', 'description' => t('Theme region within which the block is set.'), ), 'weight' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0, 'size' => 'tiny', 'description' => t('Block weight within region.'), ), ), 'primary key' => array('bid'), 'unique keys' => array( 'btr' => array('bid', 'theme', 'region') ), 'indexes' => array( 'list' => array('theme', 'region', 'weight') ) ); $schema['blocks_roles'] = array( 'description' => t('Sets up access permissions for blocks based on user roles.'), 'fields' => array( 'bid' => array( 'description' => t('Primary Key: the block unique identifier'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'rid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t("The user's role ID from {users_roles}.rid."), ), ), 'primary key' => array('bid'), 'indexes' => array( 'rid' => array('rid'), ), ); $schema['blocks_custom'] = array( 'description' => t('Stores contents of custom-made blocks.'), 'fields' => array( 'bcid' => array( 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t("Primary key: The unique custom block (box) ID."), ), 'name' => array( 'description' => t('The human readable name of the block, as shown to the user in the block admin pages.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'description' => array( 'description' => t('Provide a more descriptive information about the block.'), 'type' => 'text', 'not null' => TRUE, 'default' => '', ), 'title' => array( 'type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '', 'description' => t('Custom title for the block. (Empty string will use block default title, will remove the title, text will cause block to use specified title.)'), ), 'body' => array( 'type' => 'text', 'not null' => FALSE, 'size' => 'big', 'description' => t('Block contents.'), ), 'format' => array( 'type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0, 'description' => t("Block body's {filter_formats}.format; for example, 1 = Filtered HTML."), ) ), 'unique keys' => array( 'name' => array('name'), ), 'primary key' => array('bcid'), ); $schema['cache_block'] = drupal_get_schema_unprocessed('system', 'cache'); $schema['cache_block']['description'] = t('Cache table for the Block module to store already built blocks, identified by the block unique ID, and various contexts which may change the block, such as theme, locale, and caching mode defined for the block.'); return $schema; }