You are here

uc_ups.install in Ubercart 8.4

Install, update and uninstall functions for the uc_ups module.

File

shipping/uc_ups/uc_ups.install
View source
<?php

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

/**
 * Implements hook_schema().
 */
function uc_ups_schema() {
  $schema = [];
  $schema['uc_ups_products'] = [
    'description' => 'Stores product information for UPS shipping quotes.',
    'fields' => [
      'vid' => [
        'description' => 'The {uc_products}.vid.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'nid' => [
        'description' => 'The {uc_products}.nid.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'pkg_type' => [
        'description' => 'The type of package in which the product will be shipped.',
        'type' => 'varchar',
        'length' => 2,
        'not null' => TRUE,
        'default' => '',
      ],
    ],
    'primary key' => [
      'vid',
    ],
    'foreign keys' => [
      'uc_products' => [
        'table' => 'uc_products',
        'columns' => [
          'nid' => 'nid',
          'vid' => 'vid',
        ],
      ],
    ],
  ];
  return $schema;
}

Functions

Namesort descending Description
uc_ups_schema Implements hook_schema().