You are here

function bootstrap_simple_carousel_schema in bootstrap simple carousel 8

Implements hook_schema().

File

./bootstrap_simple_carousel.install, line 14
Defines install of bootstrap simple carousel.

Code

function bootstrap_simple_carousel_schema() {
  $schema['bootstrap_simple_carousel'] = [
    'description' => 'Items of the carousel module.',
    'fields' => [
      'cid' => [
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'image_id' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'image_alt' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'default' => '',
      ],
      'image_title' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'default' => '',
      ],
      'image_link' => [
        'type' => 'varchar_ascii',
        'length' => 255,
        'not null' => FALSE,
        'default' => '',
      ],
      'caption_title' => [
        'type' => 'varchar',
        'length' => 100,
        'not null' => FALSE,
        'default' => '',
      ],
      'caption_text' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'default' => '',
      ],
      'weight' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'status' => [
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
      ],
    ],
    'primary key' => [
      'cid',
    ],
  ];
  return $schema;
}