You are here

farm_inventory.install in farmOS 7

Farm inventory install.

File

modules/farm/farm_inventory/farm_inventory.install
View source
<?php

/**
 * @file
 * Farm inventory install.
 */

/**
 * Implements hook_schema().
 */
function farm_inventory_schema() {
  $schema['farm_inventory_asset_type'] = array(
    'description' => 'Farm inventory asset type settings',
    'fields' => array(
      'type' => array(
        'description' => 'Farm asset type machine-readable name',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
      'enabled' => array(
        'description' => 'Boolean indicating whether inventory is enabled on this asset type.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'individual' => array(
        'description' => 'Boolean indicating that assets without inventory will be treated as individuals.',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'unique keys' => array(
      'type' => array(
        'type',
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
farm_inventory_schema Implements hook_schema().