-
Notifications
You must be signed in to change notification settings - Fork 0
/
uc_promotions.install
67 lines (64 loc) · 1.58 KB
/
uc_promotions.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
<?php
/**
* Implementation of hook_install
*/
function uc_promotions_install(){
drupal_install_schema('uc_promotions');
}
/**
* Implementation of hook_uninstall
*/
function uc_promotions_uninstall(){
drupal_uninstall_schema('uc_promotions');
}
/**
* Implementation of hook_schema
*/
function uc_promotions_schema(){
//Promotions table
$schema['uc_promotions'] = array(
'description' => 'Ubercart Promotions.',
'fields' => array(
'promoid' => array(
'description' => 'The promotion id.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'nid' => array(
'description' => 'The {node}.nid of the promo product.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'price_limit' => array(
'description' => 'The minimum cart total to fire the promotion.',
'type' => 'numeric',
'precision' => 16,
'scale' => 5,
'not null' => TRUE,
'default' => 0.0,
),
'domain' => array(
'description' => 'The specific subdomain to apply the promotion.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'status' => array(
'description' => 'Status: 1 -> published.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'promoid' => array('promoid'),
),
'primary key' => array('promoid'),
);
return $schema;
}