You are here

views_revisions.install in Views Revisions 6

Same filename and directory in other branches
  1. 7 views_revisions.install

File

views_revisions.install
View source
<?php

/**
 * Implements hook_install().
 */
function views_revisions_install() {
  drupal_install_schema('views_revisions');
}

/**
 * Implements hook_uninstall().
 */
function views_revisions_uninstall() {
  drupal_uninstall_schema('views_revisions');
}

/**
 * Implements hook_schema().
 */
function views_revisions_schema() {
  $schema['views_revisions'] = array(
    'description' => 'The base table for the views_revisions module.',
    'fields' => array(
      'vrvid' => array(
        'description' => 'The primary identifier for a views revisions entry.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'vid' => array(
        'description' => 'The views id.',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => 'The acting user id.',
        'type' => 'int',
        'not null' => TRUE,
      ),
      'created' => array(
        'description' => 'The unix timestamp of when the revision was created.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'log' => array(
        'description' => 'The views revision log message.',
        'type' => 'text',
        'size' => 'medium',
      ),
      'data' => array(
        'description' => 'The export data of the view when the revision was created.',
        'type' => 'text',
        'size' => 'normal',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'vrvid',
    ),
  );
  return $schema;
}