You are here

function uc_discounts_update_6004 in Ubercart Discounts (Alternative) 7.2

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

Add uc_discounts_authors table.

File

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

Code

function uc_discounts_update_6004() {
  $schema['uc_discounts_authors'] = array(
    'fields' => array(
      'discount_author_id' => array(
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'discount_id' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('The {uc_discounts}.discount_id of the discount.'),
      ),
      'author_id' => array(
        'type' => 'int',
        'not null' => TRUE,
        'description' => t('The {users}.uid of the author being discounted.'),
      ),
    ),
    'primary key' => array(
      'discount_author_id',
    ),
  );
  db_create_table('uc_discounts_authors', $schema['uc_discounts_authors']);
}