You are here

function uc_payment_pack_schema in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 payment/uc_payment_pack/uc_payment_pack.install \uc_payment_pack_schema()
  2. 7.3 payment/uc_payment_pack/uc_payment_pack.install \uc_payment_pack_schema()

@file Install hooks for uc_payment_pack.module.

File

payment/uc_payment_pack/uc_payment_pack.install, line 8
Install hooks for uc_payment_pack.module.

Code

function uc_payment_pack_schema() {
  $schema = array();
  $schema['uc_payment_check'] = array(
    'description' => 'Stores check payment information.',
    'fields' => array(
      'check_id' => array(
        'description' => 'Primary key: the check ID.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'order_id' => array(
        'description' => 'The {uc_orders}.order_id.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'clear_date' => array(
        'description' => 'The Unix timestamp indicating the expected clear date for the check.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'order_id' => array(
        'order_id',
      ),
    ),
    'primary key' => array(
      'check_id',
    ),
  );
  $schema['uc_payment_cod'] = array(
    'description' => 'Stores COD payment information.',
    'fields' => array(
      'order_id' => array(
        'description' => 'The {uc_orders}.order_id.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'delivery_month' => array(
        'description' => 'The month of delivery. 1 => January, 2 => February, etc.',
        'type' => 'int',
        'size' => 'small',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'delivery_day' => array(
        'description' => 'The day of the month of delivery.',
        'type' => 'int',
        'size' => 'small',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'delivery_year' => array(
        'description' => 'The year of delivery.',
        'type' => 'int',
        'size' => 'small',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'order_id',
    ),
  );
  $schema['uc_payment_other'] = array(
    'description' => 'Stores Other payment type information.',
    'fields' => array(
      'order_id' => array(
        'description' => 'The {uc_orders}.order_id.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'description' => array(
        'description' => 'The description of the payment type.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'order_id',
    ),
  );
  return $schema;
}