You are here

function dynamic_background_blog_schema in Dynamic Background 7

Same name and namespace in other branches
  1. 6 modules/dynamic_background_blog/dynamic_background_blog.install \dynamic_background_blog_schema()
  2. 7.2 modules/dynamic_background_blog/dynamic_background_blog.install \dynamic_background_blog_schema()

Implementation of hook_schema(), which implementes the table dynamic_background_node that holds information about about the pr. node selected image.

Return value

array $schema

File

modules/dynamic_background_blog/dynamic_background_blog.install, line 16
Installes the database scheme and handles install and uninstall of the module.

Code

function dynamic_background_blog_schema() {
  $schema = array();
  $schema['dynamic_background_blog'] = array(
    'description' => t(''),
    'fields' => array(
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'image_id' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'uid',
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
  );
  return $schema;
}