You are here

function amazon_similar_schema in Amazon Product Advertisement API 7

Same name and namespace in other branches
  1. 6 amazon_similar/amazon_similar.install \amazon_similar_schema()
  2. 7.2 amazon_similar/amazon_similar.install \amazon_similar_schema()

Implements hook_schema().

File

amazon_similar/amazon_similar.install, line 11
amazon_similar.install Install, update and uninstall functions for Amazon Similar module.

Code

function amazon_similar_schema() {
  $schema['amazon_similar'] = array(
    'fields' => array(
      'asin' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'item' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'delta' => array(
        'type' => 'int',
        'default' => 0,
        'not null' => TRUE,
        'unsigned' => TRUE,
      ),
    ),
    'primary key' => array(
      'asin',
      'item',
    ),
    'indexes' => array(
      'item' => array(
        'item',
      ),
    ),
  );
  return $schema;
}