Code coverage for /20081101/modules/trigger/trigger.install

Line #Times calledCode
1
<?php
2
// $Id: trigger.install,v 1.5 2007/12/28 12:02:52 dries Exp $
3
4
/**
5
 * Implementation of hook_install().
6
 */
71
function trigger_install() {
8
  // Create tables.
91
  drupal_install_schema('trigger');
10
11
  // Do initial synchronization of actions in code and the database.
121
  actions_synchronize(actions_list());
131
}
14
15
/**
16
 * Implementation of hook_uninstall().
17
 */
181
function trigger_uninstall() {
19
  // Remove tables.
200
  drupal_uninstall_schema('trigger');
210
}
22
23
/**
24
 * Implementation of hook_schema().
25
 */
261
function trigger_schema() {
271
  $schema['trigger_assignments'] = array(
281
    'description' => t('Maps trigger to hook and operation assignments from
trigger.module.'),
29
    'fields' => array(
30
      'hook' => array(
311
        'type' => 'varchar',
321
        'length' => 32,
331
        'not null' => TRUE,
341
        'default' => '',
351
        'description' => t('Primary Key: The name of the internal Drupal
hook upon which an action is firing; for example, nodeapi.'),
361
      ),
37
      'op' => array(
381
        'type' => 'varchar',
391
        'length' => 32,
401
        'not null' => TRUE,
411
        'default' => '',
421
        'description' => t('Primary Key: The specific operation of the hook
upon which an action is firing: for example, presave.'),
431
      ),
44
      'aid' => array(
451
        'type' => 'varchar',
461
        'length' => 255,
471
        'not null' => TRUE,
481
        'default' => '',
491
        'description' => t("Primary Key: Action's {actions}.aid."),
501
      ),
51
      'weight' => array(
521
        'type' => 'int',
531
        'not null' => TRUE,
541
        'default' => 0,
551
        'description' => t('The weight of the trigger assignment in
relation to other triggers.'),
561
      ),
571
    ),
581
    'primary key' => array('hook', 'op', 'aid'),
59
  );
601
  return $schema;
610
}
62
63
641