-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket.install
48 lines (46 loc) · 1.2 KB
/
bitbucket.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
<?php
/**
* @file
* Install and update hooks.
*/
/**
* Implements hook_schema().
*/
function bitbucket_schema() {
$schema['bitbucket_user_access_tokens'] = [
'description' => 'Storage of Bitbucket user access tokens.',
'fields' => [
'uid' => [
'description' => 'The {users}.uid that read the {node} nid.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'access_token' => [
'description' => 'Access token required for fetching user data from the Bitbucket API.',
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
],
'expires' => [
'description' => 'Unix timestamp when this access token expires.',
'type' => 'int',
'not null' => TRUE,
],
'refresh_token' => [
'description' => 'Access token required for refreshing the access token once it has expired.',
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
],
'user_id' => [
'description' => 'Bitbucket user id.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
],
],
'primary key' => ['uid'],
];
return $schema;
}