You are here

party_activity.install in Party 8.2

Same filename and directory in other branches
  1. 7 modules/party_activity/party_activity.install

Install scripts and other things for the party activity module

File

modules/party_activity/party_activity.install
View source
<?php

/**
 * @file Install scripts and other things for the party activity module
 */

/**
 * Implements hook_schema()
 */
function party_activity_schema() {
  $schema['party_activity_type'] = array(
    'description' => 'Stores information about Party Activity Types',
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique Activity type identifier',
      ),
      'type' => array(
        'description' => 'The machine-readable name of this activity type.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'label' => array(
        'description' => 'The human-readable name of this activity type.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'The weight of this model type in relation to others.',
      ),
    ) + entity_exportable_schema_fields(),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'type' => array(
        'type',
      ),
    ),
  );
  $schema['party_activity'] = array(
    'description' => 'Stores information about Party Activities',
    'fields' => array(
      'party_activity_id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique Party Activity Identifier',
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'description' => 'The title of this party activity',
        'not null' => TRUE,
        'default' => '',
      ),
      'type' => array(
        'type' => 'varchar',
        'length' => 255,
        'description' => 'Bundle Key: The type of aqctivity this is',
        'not null' => TRUE,
        'default' => '',
      ),
      'created' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'When this activity was created',
      ),
      'modified' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'When this activity was last modified',
      ),
      'user' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The User ID of the the creator of this activity',
      ),
    ),
    'primary key' => array(
      'party_activity_id',
    ),
    'indexes' => array(
      'type' => array(
        'type',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
party_activity_schema Implements hook_schema()