You are here

function typekit_api_schema in @font-your-face 6

Implements hook_schema.

File

modules/typekit_api/typekit_api.install, line 30
Adds typekit tables for caching API data.

Code

function typekit_api_schema() {
  $schema = array();
  $schema['typekit_api_variant'] = array(
    'description' => 'Stores Typekit variant information.',
    'fields' => array(
      'vid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary Key: Unique variant ID.',
      ),
      'typekit_id' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font variant ID on Typekit.',
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font variant name.',
      ),
      'css_name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The CSS font-family.',
      ),
      'style' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The CSS font-style.',
      ),
      'variant' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The CSS font-variant.',
      ),
      'weight' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The CSS font-weight.',
      ),
      'foundry' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font foundry name.',
      ),
      'family' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The family name.',
      ),
      'kit' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The kit ID on Typekit.',
      ),
    ),
    'primary key' => array(
      'vid',
    ),
  );
  return $schema;
}