| 1 |
<?php
|
| 2 |
// $Id: uc_vat_number.install,v 1.1 2008/11/18 16:36:23 zmove Exp $
|
| 3 |
/**
|
| 4 |
* Implementation of hook_install().
|
| 5 |
**/
|
| 6 |
function uc_vat_number_install() {
|
| 7 |
drupal_install_schema('uc_vat_number');
|
| 8 |
}
|
| 9 |
|
| 10 |
/**
|
| 11 |
* Implementation of hook_schema().
|
| 12 |
**/
|
| 13 |
function uc_vat_number_schema() {
|
| 14 |
$schema['uc_vat_number'] = array(
|
| 15 |
'fields' => array(
|
| 16 |
'vat_number_id' => array('type' => 'serial', 'not null' => TRUE),
|
| 17 |
'order_id' => array('type' => 'int', 'not null' => TRUE),
|
| 18 |
'vat_number' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE),
|
| 19 |
),
|
| 20 |
'primary key' => array('vat_number_id'),
|
| 21 |
);
|
| 22 |
return $schema;
|
| 23 |
}
|
| 24 |
|
| 25 |
/**
|
| 26 |
* Implementation of hook_uninstall().
|
| 27 |
**/
|
| 28 |
function uc_vat_number_uninstall() {
|
| 29 |
db_query("DROP TABLE IF EXISTS {uc_vat_numbers}");
|
| 30 |
variable_del('uc_store_vat_number');
|
| 31 |
variable_del('uc_pane_vat_number_enabled');
|
| 32 |
variable_del('uc_pane_vat_number_weight');
|
| 33 |
variable_del('uc_order_pane_vat_number_show_view');
|
| 34 |
variable_del('uc_order_pane_vat_number_weight_view');
|
| 35 |
}
|