| 1 |
<?php |
<?php |
| 2 |
// $Id: uc_multicurrency.install,v 1.1 2009/02/18 00:53:47 tr Exp $ |
// $Id: uc_multicurrency.install,v 1.2 2009/04/07 05:03:54 tr Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_schema(). |
* Implementation of hook_schema(). |
| 6 |
*/ |
*/ |
| 7 |
function uc_multicurrency_schema() { |
function uc_multicurrency_schema() { |
| 8 |
$schema['uc_order_currency'] = array( |
$schema['uc_order_currency'] = array( |
| 9 |
'description' => t('Table to hold currency conversion data associated with an order'), |
'description' => 'Table to hold currency conversion data associated with an order', |
| 10 |
'fields' => array( |
'fields' => array( |
| 11 |
|
|
| 12 |
'order_id' => array( |
'order_id' => array( |
| 13 |
'description' => t('Unique Order ID'), |
'description' => 'Unique Order ID', |
| 14 |
'type' => 'int', |
'type' => 'int', |
| 15 |
'size' => 'medium', |
'size' => 'medium', |
| 16 |
'disp-width' => '9', |
'disp-width' => '9', |
| 17 |
'not null' => TRUE, |
'not null' => TRUE, |
| 18 |
), |
), |
| 19 |
'store_currency' => array( |
'store_currency' => array( |
| 20 |
'description' => t('Currency in which store prices are set in database atime of this order'), |
'description' => 'Currency in which store prices are set in database atime of this order', |
| 21 |
'type' => 'varchar', |
'type' => 'varchar', |
| 22 |
'length' => 3, |
'length' => 3, |
| 23 |
'not null' => TRUE, |
'not null' => TRUE, |
| 24 |
), |
), |
| 25 |
'sale_currency' => array( |
'sale_currency' => array( |
| 26 |
'description' => t('Currency displayed to customer for this order'), |
'description' => 'Currency displayed to customer for this order', |
| 27 |
'type' => 'varchar', |
'type' => 'varchar', |
| 28 |
'length' => 3, |
'length' => 3, |
| 29 |
'not null' => TRUE, |
'not null' => TRUE, |
| 30 |
), |
), |
| 31 |
'conversion_factor' => array( |
'conversion_factor' => array( |
| 32 |
'description' => t('Store currency / sale currency at time of this order'), |
'description' => 'Store currency / sale currency at time of this order', |
| 33 |
'type' => 'float', |
'type' => 'float', |
| 34 |
'not null' => TRUE, |
'not null' => TRUE, |
| 35 |
), |
), |
| 36 |
'conversion_multiplier' => array( |
'conversion_multiplier' => array( |
| 37 |
'description' => t('Conversion factor markup for this order'), |
'description' => 'Conversion factor markup for this order', |
| 38 |
'type' => 'float', |
'type' => 'float', |
| 39 |
'not null' => TRUE, |
'not null' => TRUE, |
| 40 |
), |
), |
| 41 |
'rounding' => array( |
'rounding' => array( |
| 42 |
'description' => t('Rounding preferences set for this order'), |
'description' => 'Rounding preferences set for this order', |
| 43 |
'type' => 'int', |
'type' => 'int', |
| 44 |
'size' => 'tiny', |
'size' => 'tiny', |
| 45 |
'disp-width' => '4', |
'disp-width' => '4', |
| 46 |
'not null' => TRUE, |
'not null' => TRUE, |
| 47 |
), |
), |
| 48 |
'rounding_decimal' => array( |
'rounding_decimal' => array( |
| 49 |
'description' => t('Decimal digits for rounding product prices, if any'), |
'description' => 'Decimal digits for rounding product prices, if any', |
| 50 |
'type' => 'int', |
'type' => 'int', |
| 51 |
'size' => 'tiny', |
'size' => 'tiny', |
| 52 |
'disp-width' => '4', |
'disp-width' => '4', |