aboutsummaryrefslogtreecommitdiff
path: root/muamba.install
blob: 4e38f490122f5fbda8454864744ab88c3223a78f (plain)
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
<?php

/**
 * @file
 * Muamba installation functions.
 */

function muamba_install() {
}

function muamba_schema() {
  $schema['muamba'] = array(
    'description' => 'The base table for muamba assets.',
    'fields'      => array(
      'quantity'  => array(
        'description' => 'Asset quantity', 
        'type'        => 'int',
        'unsigned'    => TRUE,
        'not null'    => TRUE,
        'default'     => 1,
      ),
      'nid'       => array(
        'description' => t('The {node}.nid of the borrowed item.'),
        'type'        => 'int',
        'unsigned'    => TRUE,
        'not null'    => TRUE,
        'default'     => 0,
      ),
      'uid'       => array(
        'description' => t('The {user}.uid requesting an item.'),
        'type'        => 'int',
        'unsigned'    => TRUE,
        'not null'    => TRUE,
        'default'     => 0,
      ),
      'primary key' => array('uid', 'nid'),
      'indexes'     => array(
        'nid' => array('nid'),
        'uid' => array('uid'),
      ),
    ),
  );

  return $schema;
}