You are here

entity_modified.install in Entity modified 7

Install, uninstall, and update implementations for entity modified module.

File

entity_modified.install
View source
<?php

/**
 * @file
 * Install, uninstall, and update implementations for entity modified module.
 */

/**
 * Implements hook_schema().
 */
function entity_modified_schema() {
  $schema['entity_modified'] = array(
    'description' => 'Entity modification timestamps for entities that do not support it natively.',
    'fields' => array(
      'entity_type' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The entity type this modified tracker refers to.',
      ),
      'entity_id' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The entity ID this modified tracker refers to.',
      ),
      'modified' => array(
        'description' => 'The Unix timestamp when the entity was most recently saved.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'entity_type',
      'entity_id',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
entity_modified_schema Implements hook_schema().