uc_usps.install in Ubercart 8.4
Same filename and directory in other branches
Install, update and uninstall functions for the uc_usps module.
File
shipping/uc_usps/uc_usps.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the uc_usps module.
*/
/**
* Implements hook_schema().
*/
function uc_usps_schema() {
$schema = [];
$schema['uc_usps_products'] = [
'description' => 'Stores product information for USPS 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,
],
'container' => [
'description' => 'The package type in which the product will be shipped.',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
],
],
'primary key' => [
'vid',
],
'foreign keys' => [
'uc_products' => [
'table' => 'uc_products',
'columns' => [
'nid' => 'nid',
'vid' => 'vid',
],
],
],
];
return $schema;
}
Functions
Name | Description |
---|---|
uc_usps_schema | Implements hook_schema(). |