You are here

function agreement_schema in Agreement 3.0.x

Same name and namespace in other branches
  1. 8.2 agreement.install \agreement_schema()
  2. 6.2 agreement.install \agreement_schema()
  3. 6 agreement.install \agreement_schema()
  4. 7.2 agreement.install \agreement_schema()

Implements hook_schema().

File

./agreement.install, line 19
Install, update and uninstall functions for Agreement module.

Code

function agreement_schema() {
  $schema['agreement'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'type' => array(
        'type' => 'varchar',
        'length' => 100,
        'not null' => TRUE,
        'default' => 'default',
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'agreed' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'sid' => array(
        'type' => 'varchar',
        'length' => 100,
      ),
      'agreed_date' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'indexes' => array(
      'type_uid' => array(
        'type',
        'uid',
      ),
    ),
  );
  return $schema;
}