You are here

function pm_update_7102 in Drupal PM (Project Management) 7

Same name and namespace in other branches
  1. 8 pm.install \pm_update_7102()
  2. 7.3 pm.install \pm_update_7102()
  3. 7.2 pm.install \pm_update_7102()

Make date field available to PM content types.

File

./pm.install, line 119
Install, update and uninstall functions for the Project Management module.

Code

function pm_update_7102() {

  // Set up date field.
  field_create_field(array(
    'type' => 'datetime',
    'field_name' => 'pm_date',
    'settings' => array(
      'granularity' => array(
        'year' => 'year',
        'month' => 'month',
        'day' => 'day',
        'hour' => 'hour',
        'minute' => 'minute',
        'second' => 0,
      ),
      'tz_handling' => 'none',
      'timezone_db' => '',
      'todate' => 'optional',
    ),
    'cardinality' => '1',
  ));
  variable_del('pm_yearsrangebegin');
  variable_del('pm_yearsrangeend');
}