You are here

function apply_for_role_schema in Apply for role 6

Same name and namespace in other branches
  1. 8 apply_for_role.install \apply_for_role_schema()
  2. 7.2 apply_for_role.install \apply_for_role_schema()
  3. 7 apply_for_role.install \apply_for_role_schema()

Implementation of hook_schema().

File

./apply_for_role.install, line 14

Code

function apply_for_role_schema() {
  $schema['users_roles_apply'] = array(
    'fields' => array(
      'uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'rid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'approved' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
      ),
      'apply_date' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'approve_date' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'uid',
      'rid',
    ),
  );
  return $schema;
}