You are here

hosting_site_data.install in Hosting 6.2

File

example/site_data/hosting_site_data.install
View source
<?php

/**
 * Implementation of hook_schema().
 */
function hosting_site_data_schema() {
  $schema['hosting_site_data'] = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'site_data' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
      ),
    ),
    'indexes' => array(
      'vid' => array(
        'vid',
      ),
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install().
 */
function hosting_site_data_install() {

  // Create tables.
  drupal_install_schema('hosting_site_data');
}

/**
 * Implementation of hook_uninstall().
 */
function hosting_site_data_uninstall() {

  // Remove tables.
  drupal_uninstall_schema('hosting_site_data');
}

Functions

Namesort descending Description
hosting_site_data_install Implementation of hook_install().
hosting_site_data_schema Implementation of hook_schema().
hosting_site_data_uninstall Implementation of hook_uninstall().