You are here

kernest.install in @font-your-face 6

Same filename and directory in other branches
  1. 7 modules/kernest/kernest.install

Adds KERNEST tables for caching API data.

File

modules/kernest/kernest.install
View source
<?php

/**
 * @file
 * Adds KERNEST tables for caching API data.
 */

/**
 * Implements hook_install().
 */
function kernest_install() {
  drupal_install_schema('kernest');
}

// kernest_install

/**
 * Implements hook_uninstall().
 */
function kernest_uninstall() {
  drupal_uninstall_schema('kernest');
  variable_del('kernest_last_api_update');
}

// kernest_uninstall

/**
 * Implements hook_schema.
 */
function kernest_schema() {
  $schema = array();
  $schema['kernest'] = array(
    'description' => 'Stores KERNEST group information.',
    'fields' => array(
      'fid' => 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 name.',
      ),
      'url' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The font url.',
      ),
      'css' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'Recommended CSS for the font.',
      ),
      'foundry' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The foundry name.',
      ),
      'license' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The license name.',
      ),
      'license_url' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The license URL.',
      ),
    ),
    'primary key' => array(
      'fid',
    ),
  );
  return $schema;
}

// kernest_schema

Functions

Namesort descending Description
kernest_install Implements hook_install().
kernest_schema Implements hook_schema.
kernest_uninstall Implements hook_uninstall().