You are here

function amazon_versions_schema in Amazon Product Advertisement API 7

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

Implements hook_schema().

File

amazon_versions/amazon_versions.install, line 11
amazon_versions.install Install, update and uninstall functions for Amazon Versions module.

Code

function amazon_versions_schema() {
  $schema['amazon_versions'] = 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' => '',
      ),
      'binding' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => FALSE,
        'default' => NULL,
      ),
      'delta' => array(
        'type' => 'int',
        'not null' => TRUE,
        'unsigned' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'asin',
      'item',
    ),
    'indexes' => array(
      'item' => array(
        'item',
      ),
    ),
  );
  return $schema;
}