You are here

farm_asset_property.install in farmOS 7

Farm asset property install.

File

modules/farm/farm_asset/farm_asset_property/farm_asset_property.install
View source
<?php

/**
 * @file
 * Farm asset property install.
 */

/**
 * Implements hook_schema().
 */
function farm_asset_property_schema() {
  $schema['farm_asset_property'] = array(
    'description' => 'Farm asset property key/value store.',
    'fields' => array(
      'id' => array(
        'description' => 'Farm asset ID',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'name' => array(
        'description' => 'Property name',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'value' => array(
        'description' => 'Property value',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'id',
      'name',
    ),
    'indexes' => array(
      'namevalue' => array(
        'name',
        'value',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
farm_asset_property_schema Implements hook_schema().