You are here

rate_expiration.install in Rate 6.2

Same filename and directory in other branches
  1. 7 expiration/rate_expiration.install

File

expiration/rate_expiration.install
View source
<?php

/**
 * Implements hook_install().
 */
function rate_expiration_install() {
  drupal_install_schema('rate_expiration');
}

/**
 * Implements hook_uninstall().
 */
function rate_expiration_uninstall() {
  drupal_uninstall_schema('rate_expiration');
}

/**
 * Implements hook_schema().
 */
function rate_expiration_schema() {
  $schema = array();
  $schema['rate_expiration'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'widget_name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'start' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'end' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}