You are here

function rate_schema in Rate 7

Same name and namespace in other branches
  1. 8.2 rate.install \rate_schema()
  2. 8 rate.install \rate_schema()
  3. 7.2 rate.install \rate_schema()

Implements hook_schema().

File

./rate.install, line 18
Installation/Uninstallation functions for rate module.

Code

function rate_schema() {
  $schema = array();
  $schema['rate_bot_agent'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'pattern' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  $schema['rate_bot_ip'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'ip' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}