You are here

function profile2_regpath_schema in Profile2 Registration Path 7

Same name and namespace in other branches
  1. 7.2 profile2_regpath.install \profile2_regpath_schema()

Implements hook_schema().

File

./profile2_regpath.install, line 11
Install file for the profile2_regpath module.

Code

function profile2_regpath_schema() {
  $schema['profile2_regpath'] = array(
    'description' => 'Stores registration path information for profile2 profiles',
    'export' => array(
      'key' => 'profile_type',
      'key name' => 'Profile Type',
      'primary key' => 'profile_type',
      'identifier' => 'regpath',
      'api' => array(
        'owner' => 'profile2_regpath',
        'api' => 'profile2_regpath',
        'minimum_version' => '1',
        'current_version' => '1',
      ),
    ),
    'fields' => array(
      'profile_type' => array(
        'description' => 'The {profile_type}.type of this profile.',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'profile_id' => array(
        'description' => 'Profile2 profile ID',
        'type' => 'int',
        'not null' => TRUE,
        'no export' => TRUE,
      ),
      'path' => array(
        'description' => 'Profile-specific registration form path',
        'type' => 'varchar',
        'length' => '2048',
        'not null' => FALSE,
      ),
      'roles' => array(
        'description' => 'Array of role ids',
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'status' => array(
        'description' => 'Enabled or disabled',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'weight' => array(
        'description' => 'Weight of profile type',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'misc' => array(
        'description' => 'Miscellaneous display settings',
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'profile_type',
    ),
    'indexes' => array(
      'type' => array(
        array(
          'path',
          255,
        ),
      ),
    ),
  );
  return $schema;
}