You are here

function feedback_schema in Feedback 6.2

Same name and namespace in other branches
  1. 7.2 feedback.install \feedback_schema()

Implementation of hook_schema().

File

./feedback.install, line 6

Code

function feedback_schema() {
  $schema['feedback'] = array(
    'description' => t('Stores all feedback messages.'),
    'fields' => array(
      'fid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => t('The primary identifier for a feedback message.'),
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The user id of the author of a feedback message.'),
      ),
      'status' => array(
        'type' => 'int',
        'size' => 'tiny',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The status of a feedback message.'),
      ),
      'message' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
        'description' => t('The actual feedback message.'),
      ),
      'location' => array(
        'type' => 'text',
        'not null' => TRUE,
        'description' => t('The internal Drupal path of the page the feedback message was submitted on.'),
      ),
      'location_masked' => array(
        'type' => 'text',
        'not null' => TRUE,
        'description' => t('The masked Drupal path of the page the feedback message was submitted on.'),
      ),
      'url' => array(
        'type' => 'text',
        'not null' => TRUE,
        'description' => t('The absolute URL of the page the feedback message was submitted on.'),
      ),
      'useragent' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => t('The user agent of the feedback message author.'),
      ),
      'timestamp' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The UNIX timestamp when the feedback message was created.'),
      ),
    ),
    'primary key' => array(
      'fid',
    ),
    'indexes' => array(
      'location' => array(
        array(
          'location',
          32,
        ),
      ),
      'location_masked' => array(
        array(
          'location_masked',
          32,
        ),
      ),
    ),
  );
  return $schema;
}