function rotating_banner_schema in Rotating Banner 7.2
Same name and namespace in other branches
- 7 rotating_banner.install \rotating_banner_schema()
Implements hook_schema().
File
- ./
rotating_banner.install, line 5
Code
function rotating_banner_schema() {
$schema['rotating_banners'] = array(
'description' => 'Rotating banners',
'fields' => array(
'rbid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "Banner ID",
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '0',
),
'machine_name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '0',
),
'settings' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'rbid',
),
);
$schema['rotating_banner_slides'] = array(
'description' => 'Rotating banner slides',
'fields' => array(
'sid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => "Slide Id",
),
'rbid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'size' => 'small',
'description' => "Banner ID",
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "Slide order weight",
),
'fid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'size' => 'big',
'description' => "File ID",
),
'link' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '0',
),
'layout' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
'textboxes' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
),
),
'primary key' => array(
'sid',
),
);
return $schema;
}