-
Notifications
You must be signed in to change notification settings - Fork 0
/
payone_payment.install
76 lines (72 loc) · 1.76 KB
/
payone_payment.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
<?php
/**
* Implements hook_schema().
*/
function payone_payment_schema() {
$tables['payone_payment_transactions'] = [
'description' => 'Record payone transaction IDs for payment status items.',
'fields' => [
'psiid' => [
'description' => 'Payment status item ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'txid' => [
'description' => 'A payone transaction ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
],
'primary key' => ['psiid'],
'indexes' => [
'txid' => ['txid'],
],
'foreign keys' => [
'payment_status_item' => [
'table' => 'payment_status_item',
'columns' => ['psiid' => 'psiid'],
]
],
];
return $tables;
}
/**
* Add the {payone_pament_transactions} table.
*/
function payone_payment_update_7102() {
db_create_table('payone_payment_transactions', [
'description' => 'Record payone transaction IDs for payment status items.',
'fields' => [
'psiid' => [
'description' => 'Payment status item ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
'txid' => [
'description' => 'A payone transaction ID',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
],
'primary key' => ['psiid'],
'indexes' => [
'txid' => ['txid'],
],
'foreign keys' => [
'payment_status_item' => [
'table' => 'payment_status_item',
'columns' => ['psiid' => 'psiid'],
]
],
]);
}
/**
* Remove unneeded {payone_payment_controller_data} table.
*/
function payone_payment_update_7101() {
db_drop_table('payone_payment_controller_data');
}