You are here

function headerimage_schema in Header image 7

Same name and namespace in other branches
  1. 6 headerimage.install \headerimage_schema()

Implementation of hook_schema()

File

./headerimage.install, line 6

Code

function headerimage_schema() {
  $schema['headerimage'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'block' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '0',
      ),
      'weight' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'conditions' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  $schema['headerimage_block'] = array(
    'fields' => array(
      'delta' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'delta',
    ),
  );
  return $schema;
}