-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshorty.install
33 lines (30 loc) · 876 Bytes
/
shorty.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
<?php
// $Id$
/**
* Implementation of hook_schema().
*/
function shorty_schema() {
$schema['shortyalias'] = array(
'fields' => array(
'sid' => array('description' => 'Id of link list.', 'type' => 'serial'),
'service' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
'hash' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
'nid' => array('description' => 'Node id to point link.','type' => 'int','not null' => TRUE, 'default' => 0),
'timech' => array('type' => 'int'),
),
'primary key' => array('sid')
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function shorty_install() {
drupal_install_schema('shorty');
}
/**
* Implementation of hook_unistall().
*/
function shorty_uninstall() {
drupal_uninstall_schema('shorty');
}