You are here

support_reference.install in Support Ticketing System 7

Same filename and directory in other branches
  1. 6 support_reference/support_reference.install

Support Reference database schema.

Copyright (c) 2011. Jeremy Andrews <jeremy@tag1consulting.com>

File

support_reference/support_reference.install
View source
<?php

/**
 * @file
 * Support Reference database schema.
 *
 * Copyright (c) 2011.
 *  Jeremy Andrews <jeremy@tag1consulting.com>
 */

/**
 * Support Reference database schema.
 */
function support_reference_schema() {
  $schema['support_reference'] = array(
    'description' => 'Allow tickets to reference each other.',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Node id of the current ticket.',
      ),
      'rnid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Node id of the referenced ticket.',
      ),
    ),
    'primary key' => array(
      'nid',
      'rnid',
    ),
  );
  return $schema;
}

/**
 * Remove hardcoded block deltas.
 */
function support_reference_update_7000(&$sandbox) {

  // Get an array of the renamed block deltas, organized by module.
  $renamed_deltas = array(
    'support_reference' => array(
      '0' => 'support_reference_references',
    ),
  );
  update_fix_d7_block_deltas($sandbox, $renamed_deltas);
}

Functions

Namesort descending Description
support_reference_schema Support Reference database schema.
support_reference_update_7000 Remove hardcoded block deltas.