You are here

uc_payment_pack.install in Ubercart 8.4

Install, update and uninstall functions for the uc_payment_pack module.

File

payment/uc_payment_pack/uc_payment_pack.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the uc_payment_pack module.
 */

/**
 * Implements hook_schema().
 */
function uc_payment_pack_schema() {
  $schema = [];
  $schema['uc_payment_check'] = [
    'description' => 'Stores check payment information.',
    'fields' => [
      'check_id' => [
        'description' => 'Primary key: the check ID.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'order_id' => [
        'description' => 'The {uc_orders}.order_id.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'clear_date' => [
        'description' => 'The Unix timestamp indicating the expected clear date for the check.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'indexes' => [
      'order_id' => [
        'order_id',
      ],
    ],
    'primary key' => [
      'check_id',
    ],
    'foreign keys' => [
      'uc_orders' => [
        'table' => 'uc_orders',
        'columns' => [
          'order_id' => 'order_id',
        ],
      ],
    ],
  ];
  $schema['uc_payment_cod'] = [
    'description' => 'Stores COD payment information.',
    'fields' => [
      'order_id' => [
        'description' => 'The {uc_orders}.order_id.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'delivery_date' => [
        'description' => 'The Unix timestamp indicating the desired delivery date for the order.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'primary key' => [
      'order_id',
    ],
    'foreign keys' => [
      'uc_orders' => [
        'table' => 'uc_orders',
        'columns' => [
          'order_id' => 'order_id',
        ],
      ],
    ],
  ];
  $schema['uc_payment_other'] = [
    'description' => 'Stores Other payment type information.',
    'fields' => [
      'order_id' => [
        'description' => 'The {uc_orders}.order_id.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'description' => [
        'description' => 'The description of the payment type.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ],
    ],
    'primary key' => [
      'order_id',
    ],
    'foreign keys' => [
      'uc_orders' => [
        'table' => 'uc_orders',
        'columns' => [
          'order_id' => 'order_id',
        ],
      ],
    ],
  ];
  return $schema;
}

Functions

Namesort descending Description
uc_payment_pack_schema Implements hook_schema().