You are here

sgrid.install in Sortable Grid Views Plugin 6

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

Install file for Sortable Grid module

File

sgrid.install
View source
<?php

// $Id$

/**
 * @file 
 * Install file for Sortable Grid module
 */

/**
* Implementation of hook_install()
*/
function sgrid_install() {
  drupal_install_schema('sgrid');
}

/**
* Implementation of hook_uninstall()
*/
function sgrid_uninstall() {
  drupal_uninstall_schema('sgrid');
}
function sgrid_schema() {
  $schema['sgrid'] = array(
    'description' => 'Sgrid module sort info.',
    'fields' => array(
      'nid' => array(
        'description' => 'The primary identifier for a node.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'rank' => array(
        'description' => 'The rank of the node for this view',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'view_display' => array(
        'description' => 'The view and display name this info is related to.',
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'nid',
      'rank',
      'view_display',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
sgrid_install Implementation of hook_install()
sgrid_schema
sgrid_uninstall Implementation of hook_uninstall()