You are here

function farm_inventory_schema in farmOS 7

Implements hook_schema().

File

modules/farm/farm_inventory/farm_inventory.install, line 11
Farm inventory install.

Code

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;
}