You are here

function farm_asset_update_7000 in farmOS 7

Add 'active' field to farm assets.

File

modules/farm/farm_asset/farm_asset.install, line 137
Farm asset install.

Code

function farm_asset_update_7000(&$sandbox) {

  // Add 'active' field to farm assets.
  $active = array(
    'description' => 'Boolean indicating whether the asset is active.',
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => 1,
  );
  db_add_field('farm_asset', 'active', $active);
  db_add_index('farm_asset', 'active', array(
    'active',
  ));
}