function bootstrap_carousel_field_schema in bootstrap_carousel 7
Implements hook_field_schema().
File
- ./
bootstrap_carousel.install, line 63 - Install file for Bootstrap Carousel module.
Code
function bootstrap_carousel_field_schema($field) {
$varchar = array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
);
$text = array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
);
$int = array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
);
$columns = array(
'carousel_image' => $int,
'image_alt_text' => $varchar,
'carousel_caption' => $text,
'carousel_video' => $varchar,
'format' => $varchar,
);
return array(
'columns' => $columns,
'indexes' => array(),
'foreign keys' => array(
'format' => array(
'table' => 'filter_format',
'columns' => array(
'format' => 'format',
),
),
'file_managed' => array(
'table' => 'file_managed',
'columns' => array(
'fid' => 'carousel_image',
),
),
),
);
}