forked from colorfield/civicrm_user
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcivicrm_user.install
69 lines (67 loc) · 1.63 KB
/
civicrm_user.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
<?php
/**
* @file
* Install, update and uninstall functions for the civicrm_user module.
*/
/**
* Implements hook_schema().
*/
function civicrm_user_schema() {
$schema['civicrm_user_log'] = [
'description' => 'Logs operations on users made by the CiviCRM user module.',
'fields' => [
'id' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
],
'uid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The {users}.uid.',
],
'contact_id' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The CiviCRM contact id.',
],
// The username is logged before update.
'user_name' => [
'type' => 'varchar_ascii',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => 'The user name.',
],
// The email is logged before update.
'user_mail' => [
'type' => 'varchar_ascii',
'length' => 254,
'not null' => TRUE,
'default' => '',
'description' => 'The user email address.',
],
'operation' => [
'type' => 'varchar_ascii',
'length' => 12,
'not null' => TRUE,
'default' => '',
'description' => "The operation on the user.",
],
'timestamp' => [
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => ['id'],
'indexes' => [
'uid' => ['uid'],
],
];
return $schema;
}