You are here

function agreement_schema in Agreement 6

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

Implementation of hook_schema().

File

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

Code

function agreement_schema() {
  $schema['agreement'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      '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' => 46,
      ),
      'agreed_date' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}