You are here

nodereference_count.install in Nodereference Count 7

Same filename and directory in other branches
  1. 6 nodereference_count.install

Install, update, and uninstall functions for the nodereference_count module.

File

nodereference_count.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the nodereference_count module.
 */

/**
 * Implements hook_field_schema().
 */
function nodereference_count_field_schema($field) {
  return array(
    'columns' => array(
      'count' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
  );
}

/**
 * Implements hook_enable().
 */
function nodereference_count_enable() {

  // Weight nodereference_count to come after other field modules.
  db_update('system')
    ->fields(array(
    'weight' => 10,
  ))
    ->condition('name', 'nodereference_count')
    ->condition('type', 'module')
    ->execute();
}