forked from nbboob/arxiv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharxiv.install
More file actions
47 lines (42 loc) · 863 Bytes
/
arxiv.install
File metadata and controls
47 lines (42 loc) · 863 Bytes
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
<?php
/**
* @file
* Install, update, and uninstall functions for Arxiv.
*
*/
/**
* Implements hook_schema().
*/
function arxiv_schema() {
$schema['arxiv_downNo'] = array(
'description' => 'Stores paper download number information.',
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'node ID.',
),
'downloadNo' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'download number'
),
),
'primary key' => array('nid'),
'indexes' => array(
'dn' => array('downloadNo'),
),
);
return $schema;
}
/**
* Implements hook_uninstall().
*/
function arxiv_uninstall() {
$del = db_delete('variable')
->condition('name', 'arxiv_%', 'LIKE')
->execute();
}