You are here

function hosting_alias_schema in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 alias/hosting_alias.install \hosting_alias_schema()
  2. 7.3 alias/hosting_alias.install \hosting_alias_schema()

Implements hook_schema().

File

alias/hosting_alias.install, line 10
Define database schema and update function for the site aliases module.

Code

function hosting_alias_schema() {
  $schema['hosting_site_alias'] = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'alias' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
      ),
      'automatic' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'redirection' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'vid' => array(
        'vid',
      ),
      'alias' => array(
        'alias',
      ),
    ),
  );
  return $schema;
}