You are here

function uc_discounts_update_6001 in Ubercart Discounts (Alternative) 7.2

Same name and namespace in other branches
  1. 6.2 uc_discounts/uc_discounts.install \uc_discounts_update_6001()

Issue #984718: Add an activates_on date to discounts.

File

uc_discounts/uc_discounts.install, line 527
Install, update, and uninstall functions for uc_discounts module.

Code

function uc_discounts_update_6001() {
  $has_activation_schema = array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => 0,
    'description' => t('Whether or not discount has an activation date.'),
  );
  $activates_on_schema = array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
    'description' => t('The activation date and time as a unix timestamp.'),
  );
  db_add_field('uc_discounts', 'has_activation', $has_activation_schema);
  db_add_field('uc_discounts', 'activates_on', $activates_on_schema);
}