drupal/modules/trigger/trigger.install

39 lines
982 B
Plaintext
Raw Normal View History

<?php
// $Id$
/**
* Implementation of hook_install().
*/
function trigger_install() {
// Create tables.
drupal_install_schema('trigger');
2007-07-02 14:41:37 +00:00
// Do initial synchronization of actions in code and the database.
actions_synchronize(actions_list());
}
/**
* Implementation of hook_uninstall().
*/
function trigger_uninstall() {
// Remove tables.
drupal_uninstall_schema('trigger');
}
/**
* Implementation of hook_schema().
*/
function trigger_schema() {
$schema['trigger_assignments'] = array(
'fields' => array(
'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'op' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
),
'primary key' => array('hook', 'op', 'aid'),
);
return $schema;
}