Projet

Général

Profil

Paste
Télécharger (1,54 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / job_scheduler / modules / job_scheduler_trigger / job_scheduler_trigger.install @ 082b75eb

1
<?php
2

    
3
/**
4
 * @file
5
 * Install, update and uninstall functions for the Job Scheduler Trigger.
6
 */
7

    
8
/**
9
 * Implements hook_schema().
10
 */
11
function job_scheduler_trigger_schema() {
12
  $schema['job_scheduler_trigger'] = array(
13
    'description' => 'Schedule of triggers to be created.',
14
    'fields' => array(
15
      'trid' => array(
16
        'description' => 'Primary Key: unique trigger id.',
17
        'type' => 'serial',
18
        'unsigned' => TRUE,
19
        'not null' => TRUE,
20
      ),
21
      'hook' => array(
22
        'type' => 'varchar',
23
        'length' => 32,
24
        'not null' => TRUE,
25
        'default' => '',
26
        'description' => 'Primary Key: The name of the internal Drupal hook; for example, job_scheduer_100.',
27
      ),
28
      'title' => array(
29
        'type' => 'varchar',
30
        'length' => 255,
31
        'not null' => TRUE,
32
        'default' => '',
33
        'description' => 'Title for the trigger.',
34
      ),
35
      'crontab' => array(
36
        'type' => 'varchar',
37
        'length' => 255,
38
        'not null' => TRUE,
39
        'default' => '',
40
        'description' => 'Crontab line in *NIX format.',
41
      ),
42
      'status' => array(
43
        'description' => 'Boolean indicating whether the trigger is active.',
44
        'type' => 'int',
45
        'not null' => TRUE,
46
        'default' => 1,
47
      ),
48
      'last' => array(
49
        'type' => 'int',
50
        'unsigned' => TRUE,
51
        'default' => 0,
52
        'not null' => TRUE,
53
        'description' => 'Timestamp when it was lat triggered.',
54
      ),
55
    ),
56
    'primary key' => array('trid'),
57
  );
58
  return $schema;
59
}