You are here

function fontsquirrel_schema in @font-your-face 6

Implements hook_schema.

File

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

Code

function fontsquirrel_schema() {
  $schema = array();
  $schema['fontsquirrel_group'] = array(
    'description' => 'Stores Font Squirrel group information.',
    'fields' => array(
      'gid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary Key: Unique group ID.',
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font group name.',
      ),
      'path' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font group path.',
      ),
      'foundry_name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The foundry name.',
      ),
      'foundry_path' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The foundry path.',
      ),
      'classification' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The classification.',
      ),
      'filename' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font file.',
      ),
      'font_family' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font file.',
      ),
    ),
    'primary key' => array(
      'gid',
    ),
  );
  return $schema;
}