You are here

function party_hat_schema in Party 7

Same name and namespace in other branches
  1. 8.2 modules/party_hat/party_hat.install \party_hat_schema()

Implements hook_schema().

File

modules/party_hat/party_hat.install, line 10
Contains install hooks for the party hat module..

Code

function party_hat_schema() {
  $schema['party_hat'] = array(
    'description' => 'Stores hat definitions',
    'fields' => array(
      'hid' => array(
        'description' => 'Primary key for the hat.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'The machine readable name of the hat',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'parent' => array(
        'description' => "The machine readable name of the hat's parent.",
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
      ),
      'label' => array(
        'description' => 'A human readable name for the hat',
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
      ),
      'description' => array(
        'description' => 'Some text describing the purpose of the hat',
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'medium',
        'translatable' => TRUE,
      ),
      'data' => array(
        'type' => 'blob',
        'size' => 'big',
        'not null' => FALSE,
        'serialize' => TRUE,
        'description' => 'Serialized data containing the field properties that do not warrant a dedicated column.',
      ),
      'required' => array(
        'description' => 'This Hat is required',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ) + party_hat_exportable_schema_fields(),
    'primary key' => array(
      'hid',
    ),
  );
  return $schema;
}