| 1 |
<?php |
<?php |
| 2 |
// $Id: wishlist.install,v 1.3 2007/01/12 05:02:27 smclewin Exp $ |
// $Id: wishlist.install,v 1.4 2007/11/25 03:34:04 smclewin Exp $ |
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 51 |
function wishlist_schema() { |
function wishlist_schema() { |
| 52 |
$schema['wishlist'] = array( |
$schema['wishlist'] = array( |
| 53 |
'fields' => array( |
'fields' => array( |
| 54 |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => t('Foreign key to the node table.')), |
| 55 |
'item_is_public' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1), |
'item_is_public' => array('type' => 'int', 'size' => 'tiny', 'not null' => true, 'default' => 1, 'description' => t('Is this item public, or is it maintained on the user\'s private list')), |
| 56 |
'item_est_cost' => array('type' => 'int', 'default' => null), |
'item_est_cost' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11', 'description' => t('The estimated cost for the item')), |
| 57 |
'item_url1' => array('type' => 'text'), |
'item_url1' => array('type' => 'text', 'not null' => FALSE, 'description' => t('A URL from which the item can be purchased')), |
| 58 |
'item_url2' => array('type' => 'text'), |
'item_url2' => array('type' => 'text', 'not null' => FALSE, 'description' => t('A URL from which the item can be purchased')), |
| 59 |
'item_quantity_requested' => array('type' => 'int', 'size' => 'small', 'not null' => true, 'default' => 1), |
'item_quantity_requested' => array('type' => 'int', 'size' => 'small', 'not null' => true, 'default' => 1, 'description' => t('How many of this item does the user want?')), |
| 60 |
'item_currency' => array('type' => 'varchar', 'length' => 4, 'not null' => true, 'default' => 'USD'), |
'item_currency' => array('type' => 'varchar', 'length' => 4, 'not null' => true, 'default' => 'USD', 'description' => t('What currency is the estimated cost in')), |
| 61 |
'item_priority' => array('type' => 'int', 'size' => 'tiny', 'default' => 3) |
'item_priority' => array('type' => 'int', 'size' => 'tiny', 'default' => 3, 'not null' => FALSE, 'description' => t('How important is this item to the user?')) |
| 62 |
), |
), |
| 63 |
'primary key' => array('nid'), |
'primary key' => array('nid'), |
| 64 |
|
'description' => t('Holds the details of a wishlist node'), |
| 65 |
); |
); |
| 66 |
|
|
| 67 |
$schema['wishlist_purchased'] = array( |
$schema['wishlist_purchased'] = array( |
| 68 |
'fields' => array( |
'fields' => array( |
| 69 |
'wishlist_purch_wid' => array('type' => 'serial', 'not null' => true), |
'wishlist_purch_wid' => array('type' => 'serial', 'not null' => true, 'description' => t('Unique ID for this purchase record')), |
| 70 |
'wishlist_purch_nid' => array('type' => 'int', 'not null' => true, 'default' => 0), |
'wishlist_purch_nid' => array('type' => 'int', 'not null' => true, 'default' => 0, 'description' => t('Foreign key to the wishlist table and node table')), |
| 71 |
'wishlist_purch_buyer_uid' => array('type' => 'int', 'not null' => true, 'default' => 0), |
'wishlist_purch_buyer_uid' => array('type' => 'int', 'not null' => true, 'default' => 0, 'description' => t('UID of the user that purchased the item')), |
| 72 |
'wishlist_purch_quantity' => array('type' => 'int', 'size' => 'small', 'not null' => true, 'default' => 1), |
'wishlist_purch_quantity' => array('type' => 'int', 'size' => 'small', 'not null' => true, 'default' => 1, 'description' => t('How many this user purchased')), |
| 73 |
'purch_date' => array('type' => 'int', 'unsigned' => true, 'not null' => true, 'default' => 0), |
'purch_date' => array('type' => 'int', 'unsigned' => true, 'not null' => true, 'default' => 0, 'description' => t('The date of the purchase')), |
| 74 |
), |
), |
| 75 |
'primary key' => array('wishlist_purch_wid'), |
'primary key' => array('wishlist_purch_wid'), |
| 76 |
|
'description' => t('A record of an item purchased off of a wishlist'), |
| 77 |
); |
); |
| 78 |
|
|
| 79 |
return $schema; |
return $schema; |