You are here

feeds_entity_processor_test.install in Feeds entity processor 7

Install, update and uninstall functions for the feeds_entity_processor_test module.

File

tests/modules/feeds_entity_processor_test/feeds_entity_processor_test.install
View source
<?php

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

/**
 * Implements hook_schema().
 */
function feeds_entity_processor_test_schema() {
  $schema = array();
  $schema['feeds_entity_processor_test'] = array(
    'description' => 'Stores feeds_entity_processor_test items.',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique feeds_entity_processor_test item ID.',
      ),
      'title' => array(
        'description' => 'The label of the feeds_entity_processor_test.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'type' => array(
        'description' => 'The type of the feeds_entity_processor_test.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'status' => array(
        'description' => 'Boolean indicating whether the feeds_entity_processor_test is published.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'default' => NULL,
        'description' => "The {users}.uid of the associated user.",
      ),
      'etid' => array(
        'description' => "The entity ID.",
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'entity_type' => array(
        'description' => "The entity type (e.g. node, comment, etc').",
        'type' => 'varchar',
        'length' => '32',
        'not null' => TRUE,
        'default' => '',
      ),
      'created' => array(
        'description' => 'The Unix timestamp when the feeds_entity_processor_test was created.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'changed' => array(
        'description' => 'The Unix timestamp when the feeds_entity_processor_test was updated.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'uid' => array(
        'uid',
      ),
    ),
    'foreign keys' => array(
      'uid' => array(
        'table' => 'users',
        'columns' => array(
          'uid' => 'uid',
        ),
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  $schema['feeds_entity_processor_test_type'] = array(
    'description' => 'Stores information about all defined feeds_entity_processor_test types.',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique feeds_entity_processor_test type ID.',
      ),
      'name' => array(
        'description' => 'The machine-readable name of this feeds_entity_processor_test type.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'label' => array(
        'description' => 'The human-readable name of this feeds_entity_processor_test type.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'The weight of this feeds_entity_processor_test type in relation to others.',
      ),
      'locked' => array(
        'description' => 'A boolean indicating whether the administrator may delete this type.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
      ),
      'data' => array(
        'type' => 'text',
        'not null' => FALSE,
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'A serialized array of additional data related to this feeds_entity_processor_test type.',
        'merge' => TRUE,
      ),
      'status' => array(
        'type' => 'int',
        'not null' => TRUE,
        // Set the default to ENTITY_CUSTOM without using the constant as it is
        // not safe to use it at this point.
        'default' => 0x1,
        'size' => 'tiny',
        'description' => 'The exportable status of the entity.',
      ),
      'module' => array(
        'description' => 'The name of the providing module if the entity has been defined in code.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}

Functions