You are here

rotating_banner.install in Rotating Banner 7.2

Same filename and directory in other branches
  1. 7 rotating_banner.install

File

rotating_banner.install
View source
<?php

/**
 * Implements hook_schema().
 */
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;
}

Functions

Namesort descending Description
rotating_banner_schema Implements hook_schema().