-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuc_wishlist.install
115 lines (110 loc) · 2.87 KB
/
uc_wishlist.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
/**
* @file
* Uc_wishlist installation routine.
*
* Creates uc_wishlists and uc_wishlist_products tables.
*/
/**
* Implements hook_schema().
*/
function uc_wishlist_schema() {
$schema = [];
$schema['uc_wishlists'] = [
'description' => 'Stores wishlist meta information related to users.',
'fields' => [
'wid' => [
'description' => 'The wish list ID.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'uid' => [
'description' => 'The uid or session ID of the user creating the wish list.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'title' => [
'description' => 'The title of the wish list.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'expiration' => [
'description' => 'Timestamp for when the wish list expires.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'address' => [
'description' => 'Address for shipping items on the wish list.',
'type' => 'text',
],
'private' => [
'description' => 'Private',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'indexes' => [
'uid' => ['uid'],
],
'primary key' => ['wid'],
];
$schema['uc_wishlist_products'] = [
'description' => 'Products assigned to a wish list.',
'fields' => [
'wpid' => [
'description' => 'The ID of the wish list product.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'wid' => [
'description' => 'The {uc_wishlists}.wid for the wish list this product is assigned to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'nid' => [
'description' => 'The {node}.nid of the product.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'qty' => [
'description' => 'The quantity of this product on the wish list.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'changed' => [
'description' => 'The timestamp of the last change to this wish list product.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => TRUE,
],
'data' => [
'description' => 'The data array for the product.',
'type' => 'text',
],
'purchase' => [
'description' => 'An array of purchase data for the product.',
'type' => 'text',
],
],
'indexes' => [
'wid' => ['wid'],
],
'primary key' => ['wpid'],
];
return $schema;
}