function farm_asset_property_schema in farmOS 7
Implements hook_schema().
File
- modules/
farm/ farm_asset/ farm_asset_property/ farm_asset_property.install, line 11 - Farm asset property install.
Code
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;
}