You are here

function amazon_media_schema in Amazon Product Advertisement API 7

Same name and namespace in other branches
  1. 6 amazon_media/amazon_media.install \amazon_media_schema()
  2. 7.2 amazon_media/amazon_media.install \amazon_media_schema()
1 call to amazon_media_schema()
amazon_media_amazon_item_insert in amazon_media/amazon_media.module
Insert the associated information into the related table.

File

amazon_media/amazon_media.install, line 16
Install, update and uninstall functions for the amazon_media module.

Code

function amazon_media_schema() {
  $schema['amazon_book'] = array(
    'fields' => array(
      'asin' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
      ),
      'ean' => array(
        'type' => 'varchar',
        'length' => 20,
      ),
      'isbn' => array(
        'type' => 'varchar',
        'length' => 20,
        'not null' => TRUE,
      ),
      'deweydecimalnumber' => array(
        'type' => 'varchar',
        'length' => 64,
      ),
      'edition' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'numberofpages' => array(
        'type' => 'int',
      ),
      'publicationdate' => array(
        'type' => 'varchar',
        'length' => 32,
      ),
    ),
    'primary key' => array(
      'asin',
    ),
  );
  $schema['amazon_dvd'] = array(
    'fields' => array(
      'asin' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
      ),
      'regioncode' => array(
        'type' => 'int',
      ),
      'runningtime' => array(
        'type' => 'int',
      ),
      'audiencerating' => array(
        'type' => 'varchar',
        'length' => 64,
      ),
      'aspectratio' => array(
        'type' => 'varchar',
        'length' => 16,
      ),
    ),
    'primary key' => array(
      'asin',
    ),
  );
  $schema['amazon_music'] = array(
    'fields' => array(
      'asin' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
      ),
      'artist' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'studio' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'numberofdiscs' => array(
        'type' => 'int',
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'asin',
    ),
  );
  $schema['amazon_software'] = array(
    'fields' => array(
      'asin' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
      ),
      'esrbagerating' => array(
        'type' => 'varchar',
        'length' => 32,
      ),
      'operatingsystem' => array(
        'type' => 'varchar',
        'length' => 64,
      ),
      'hardwareplatform' => array(
        'type' => 'varchar',
        'length' => 64,
      ),
      'platform' => array(
        'type' => 'varchar',
        'length' => 64,
      ),
      'genre' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
    ),
    'primary key' => array(
      'asin',
    ),
  );
  return $schema;
}